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