3 from distutils.core import setup, Extension
9 for l in open('VERSION').readlines(): exec (l.strip())
10 __version__ = '.'.join \
11 ([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \
12 + AUBIO_VERSION_STATUS
18 include_dirs += ['ext']
19 include_dirs += [ numpy.get_include() ]
22 generated_object_files = []
24 if not os.path.isdir(output_path):
25 from generator import generate_object_files
26 generated_object_files = generate_object_files(output_path)
30 generated_object_files = glob.glob(os.path.join(output_path, '*.c'))
31 include_dirs += [output_path]
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']
39 aubio_extension = Extension("aubio._aubio", [
44 # example without macro
47 "ext/py-filterbank.c",
51 ] + generated_object_files,
52 include_dirs = include_dirs,
53 library_dirs = library_dirs,
54 define_macros = define_macros,
57 if sys.platform.startswith('darwin'):
58 aubio_extension.extra_link_args = ['-framework','CoreFoundation', '-framework','AudioToolbox']
61 'Development Status :: 4 - Beta',
62 'Environment :: Console',
63 'Intended Audience :: Science/Research',
64 'Topic :: Software Development :: Libraries',
65 'Topic :: Multimedia :: Sound/Audio :: Analysis',
66 'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis',
67 'Operating System :: POSIX',
68 'Operating System :: MacOS :: MacOS X',
69 'Operating System :: Microsoft :: Windows',
70 'Programming Language :: C',
71 'Programming Language :: Python',
72 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
75 distrib = setup(name='aubio',
76 version = __version__,
78 ext_modules = [aubio_extension],
79 description = 'interface to the aubio library',
80 long_description = 'interface to the aubio library',
81 license = 'GNU/GPL version 3',
82 author = 'Paul Brossier',
83 author_email = 'piem@aubio.org',
84 maintainer = 'Paul Brossier',
85 maintainer_email = 'piem@aubio.org',
86 url = 'http://aubio.org/',
88 classifiers = classifiers,