pyliblex/setup.py

24 lines
869 B
Python

from distutils.core import setup, Extension
def source_paths(base_path, sources):
return [base_path + s for s in sources]
liblex_path = 'external/liblex/'
liblex_sources = ['eval.c', 'pairmap.c', 'pattern.c']
liblex_source_paths = source_paths(liblex_path + 'src/', liblex_sources)
liblex_libds_path = 'external/libds/'
liblex_libds_sources = ['ht.c', 'libds.c', 'll.c', 'sprs.c', 'vec.c']
liblex_libds_source_paths = source_paths(liblex_path + liblex_libds_path + 'src/', liblex_libds_sources)
liblex_all_source_paths = liblex_libds_source_paths + liblex_source_paths
pyliblex = Extension('pyliblex',
sources = ['src/pyliblexmodule.c'] + liblex_all_source_paths,
include_dirs = [liblex_path + 'include', liblex_path + liblex_libds_path + 'include', 'include'])
setup(name='pyliblex',
version='0.0',
ext_modules = [pyliblex])