3 from setuptools import setup, Extension
4 from lib.moresetuptools import CleanGenerated, GenerateCommand
11 for l in open('VERSION').readlines(): exec (l.strip())
12 __version__ = '.'.join \
13 ([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \
14 + AUBIO_VERSION_STATUS
16 # function to generate gen/*.{c,h}
17 from lib.gen_external import generate_external
25 include_dirs += [ 'ext' ]
26 include_dirs += [ output_path ] # aubio-generated.h
27 include_dirs += [ numpy.get_include() ]
29 if sys.platform.startswith('darwin'):
30 extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
32 if os.path.isfile('../src/aubio.h'):
33 define_macros += [('USE_LOCAL_AUBIO', 1)]
34 include_dirs += ['../src'] # aubio.h
35 include_dirs += ['../build/src'] # config.h
36 library_dirs += ['../build/src']
38 aubio_extension = Extension("aubio._aubio", [
42 "ext/py-musicutils.c",
44 # example without macro
47 "ext/py-filterbank.c",
52 # generate files if they don't exit
53 ] + generate_external(output_path, overwrite = False),
54 include_dirs = include_dirs,
55 library_dirs = library_dirs,
56 extra_link_args = extra_link_args,
57 define_macros = define_macros,
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 package_dir = {'aubio':'lib/aubio'},
79 scripts = ['scripts/aubiocut'],
80 ext_modules = [aubio_extension],
81 description = 'interface to the aubio library',
82 long_description = 'interface to the aubio library',
83 license = 'GNU/GPL version 3',
84 author = 'Paul Brossier',
85 author_email = 'piem@aubio.org',
86 maintainer = 'Paul Brossier',
87 maintainer_email = 'piem@aubio.org',
88 url = 'http://aubio.org/',
90 classifiers = classifiers,
91 install_requires = ['numpy'],
93 'clean': CleanGenerated,
94 'generate': GenerateCommand,