Showing the changes to python/setup.py (1 of 2 files). Show all
Unified · Split
| @@ -11,26 +11,30 @@ __version__ = '.'.join \ · 10 unmodified lines | ||
| 11 | 11 | ([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \ |
| 12 | 12 | + AUBIO_VERSION_STATUS |
| 13 | 13 | |
| 14 | −library_dirs = ['../build/src'] | |
| 15 | −include_dirs = ['../src'] # aubio.h | |
| 16 | −include_dirs += ['../build/src'] # config.h | |
| 17 | −include_dirs += ['ext'] | |
| 18 | −include_dirs += ['gen'] | |
| 19 | −#include_dirs += ['../build/src', '../src', '.' ] | |
| 20 | − | |
| 21 | −library_dirs = filter (lambda x: os.path.isdir(x), library_dirs) | |
| 22 | −include_dirs = filter (lambda x: os.path.isdir(x), include_dirs) | |
| 14 | +include_dirs = [] | |
| 15 | +library_dirs = [] | |
| 16 | +define_macros = [] | |
| 23 | 17 | |
| 24 | −generated_object_files = [] | |
| 18 | +include_dirs += ['ext'] | |
| 19 | +include_dirs += [ numpy.get_include() ] | |
| 25 | 20 | |
| 26 | 21 | output_path = 'gen' |
| 22 | +generated_object_files = [] | |
| 27 | 23 | |
| 28 | 24 | if not os.path.isdir(output_path): |
| 29 | 25 | from generator import generate_object_files |
| 30 | 26 | generated_object_files = generate_object_files(output_path) |
| 27 | + # define include dirs | |
| 31 | 28 | else: |
| 32 | 29 | import glob |
| 33 | 30 | generated_object_files = glob.glob(os.path.join(output_path, '*.c')) |
| 31 | +include_dirs += [output_path] | |
| 32 | + | |
| 33 | +if os.path.isfile('../src/aubio.h'): | |
| 34 | + define_macros += [('USE_LOCAL_AUBIO', 1)] | |
| 35 | + include_dirs += ['../src'] # aubio.h | |
| 36 | + include_dirs += ['../build/src'] # config.h | |
| 37 | + library_dirs += ['../build/src'] | |
| 34 | 38 | |
| 35 | 39 | aubio_extension = Extension("aubio._aubio", [ |
| 36 | 40 | "ext/aubiomodule.c", |
| @@ -45,8 +49,9 @@ aubio_extension = Extension("aubio._aubio", [ · 8 unmodified lines | ||
| 45 | 49 | "ext/py-phasevoc.c", |
| 46 | 50 | # generated files |
| 47 | 51 | ] + generated_object_files, |
| 48 | − include_dirs = include_dirs + [ numpy.get_include() ], | |
| 52 | + include_dirs = include_dirs, | |
| 49 | 53 | library_dirs = library_dirs, |
| 54 | + define_macros = define_macros, | |
| 50 | 55 | libraries=['aubio']) |
| 51 | 56 | |
| 52 | 57 | if sys.platform.startswith('darwin'): |