source: setup.py @ 1eb8c0e

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampler
Last change on this file since 1eb8c0e was 1eb8c0e, checked in by Martin Hermant <martin.hermant@gmail.com>, 7 years ago

aubio version :
aubio-c / aubio-py add git commit support

  • Property mode set to 100755
File size: 2.6 KB
Line 
1#! /usr/bin/env python
2
3import sys, os.path, glob
4from setuptools import setup, Extension
5from python.lib.moresetuptools import *
6# function to generate gen/*.{c,h}
7from python.lib.gen_external import generate_external, header, output_path
8
9__version__ = get_aubio_version()
10__pip_version__ = get_aubio_pyversion()
11
12include_dirs = []
13library_dirs = []
14define_macros = [('AUBIO_VERSION', '%s' % __version__)]
15extra_link_args = []
16
17include_dirs += [ 'python/ext' ]
18include_dirs += [ output_path ] # aubio-generated.h
19try:
20    import numpy
21    include_dirs += [ numpy.get_include() ]
22except ImportError:
23    pass
24
25if sys.platform.startswith('darwin'):
26    extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
27
28sources = sorted(glob.glob(os.path.join('python', 'ext', '*.c')))
29
30aubio_extension = Extension("aubio._aubio",
31    sources,
32    include_dirs = include_dirs,
33    library_dirs = library_dirs,
34    extra_link_args = extra_link_args,
35    define_macros = define_macros)
36
37if os.path.isfile('src/aubio.h'):
38    if not os.path.isdir(os.path.join('build','src')):
39        pass
40        #__version__ += 'a2' # python only version
41
42classifiers = [
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    ]
56
57distrib = setup(name='aubio',
58    version = __pip_version__,
59    packages = ['aubio'],
60    package_dir = {'aubio':'python/lib/aubio'},
61    scripts = ['python/scripts/aubiocut'],
62    ext_modules = [aubio_extension],
63    description = 'a collection of tools for music analysis',
64    long_description = 'a collection of tools for music analysis',
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',
70    url = 'https://aubio.org/',
71    platforms = 'any',
72    classifiers = classifiers,
73    install_requires = ['numpy'],
74    setup_requires = ['numpy'],
75    cmdclass = {
76        'clean': CleanGenerated,
77        'build_ext': build_ext,
78        },
79    test_suite = 'nose2.collector.collector',
80    extras_require = {
81        'tests': ['numpy'],
82        },
83    )
Note: See TracBrowser for help on using the repository browser.