[9aa0af3] | 1 | #! /usr/bin/env python |
---|
[c71e405] | 2 | |
---|
[2675227] | 3 | import sys, os.path, glob |
---|
[1167631] | 4 | from setuptools import setup, Extension |
---|
[2675227] | 5 | from python.lib.moresetuptools import * |
---|
[1167631] | 6 | # function to generate gen/*.{c,h} |
---|
| 7 | from python.lib.gen_external import generate_external, header, output_path |
---|
[012b324] | 8 | |
---|
[f432bb1] | 9 | __version__ = get_aubio_pyversion() |
---|
[945e26d] | 10 | |
---|
[41399bd] | 11 | include_dirs = [] |
---|
| 12 | library_dirs = [] |
---|
[c8c7aa6] | 13 | define_macros = [('AUBIO_VERSION', '%s' % __version__)] |
---|
[4d3b573] | 14 | extra_link_args = [] |
---|
[012b324] | 15 | |
---|
[1167631] | 16 | include_dirs += [ 'python/ext' ] |
---|
[a89ed31] | 17 | include_dirs += [ output_path ] # aubio-generated.h |
---|
[5f6324e] | 18 | try: |
---|
| 19 | import numpy |
---|
| 20 | include_dirs += [ numpy.get_include() ] |
---|
| 21 | except ImportError: |
---|
| 22 | pass |
---|
[ad5203c] | 23 | |
---|
[4d3b573] | 24 | if sys.platform.startswith('darwin'): |
---|
| 25 | extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox'] |
---|
| 26 | |
---|
[2e40231] | 27 | sources = sorted(glob.glob(os.path.join('python', 'ext', '*.c'))) |
---|
[2675227] | 28 | |
---|
| 29 | aubio_extension = Extension("aubio._aubio", |
---|
| 30 | sources, |
---|
[4d3b573] | 31 | include_dirs = include_dirs, |
---|
| 32 | library_dirs = library_dirs, |
---|
| 33 | extra_link_args = extra_link_args, |
---|
[2675227] | 34 | define_macros = define_macros) |
---|
| 35 | |
---|
| 36 | if os.path.isfile('src/aubio.h'): |
---|
[8d09036] | 37 | if not os.path.isdir(os.path.join('build','src')): |
---|
[95bcdec] | 38 | pass |
---|
| 39 | #__version__ += 'a2' # python only version |
---|
[2675227] | 40 | |
---|
[945e26d] | 41 | classifiers = [ |
---|
[4d3b573] | 42 | 'Development Status :: 4 - Beta', |
---|
| 43 | 'Environment :: Console', |
---|
| 44 | 'Intended Audience :: Science/Research', |
---|
| 45 | 'Topic :: Software Development :: Libraries', |
---|
| 46 | 'Topic :: Multimedia :: Sound/Audio :: Analysis', |
---|
| 47 | 'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis', |
---|
| 48 | 'Operating System :: POSIX', |
---|
| 49 | 'Operating System :: MacOS :: MacOS X', |
---|
| 50 | 'Operating System :: Microsoft :: Windows', |
---|
| 51 | 'Programming Language :: C', |
---|
| 52 | 'Programming Language :: Python', |
---|
| 53 | 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', |
---|
| 54 | ] |
---|
[012b324] | 55 | |
---|
[945e26d] | 56 | distrib = setup(name='aubio', |
---|
[4d3b573] | 57 | version = __version__, |
---|
| 58 | packages = ['aubio'], |
---|
[1167631] | 59 | package_dir = {'aubio':'python/lib/aubio'}, |
---|
[1d2cc5e] | 60 | scripts = ['python/scripts/aubiocut', 'python/scripts/aubio'], |
---|
[4d3b573] | 61 | ext_modules = [aubio_extension], |
---|
[dc1fbc6] | 62 | description = 'a collection of tools for music analysis', |
---|
| 63 | long_description = 'a collection of tools for music analysis', |
---|
[4d3b573] | 64 | license = 'GNU/GPL version 3', |
---|
| 65 | author = 'Paul Brossier', |
---|
| 66 | author_email = 'piem@aubio.org', |
---|
| 67 | maintainer = 'Paul Brossier', |
---|
| 68 | maintainer_email = 'piem@aubio.org', |
---|
[0f425aa] | 69 | url = 'https://aubio.org/', |
---|
[4d3b573] | 70 | platforms = 'any', |
---|
| 71 | classifiers = classifiers, |
---|
[16f8dcc] | 72 | install_requires = ['numpy'], |
---|
[6264d30] | 73 | setup_requires = ['numpy'], |
---|
[a89ed31] | 74 | cmdclass = { |
---|
| 75 | 'clean': CleanGenerated, |
---|
[b1d37c0] | 76 | 'build_ext': build_ext, |
---|
[1167631] | 77 | }, |
---|
| 78 | test_suite = 'nose2.collector.collector', |
---|
[6264d30] | 79 | extras_require = { |
---|
| 80 | 'tests': ['numpy'], |
---|
| 81 | }, |
---|
[4d3b573] | 82 | ) |
---|