source: setup.py @ aab682e

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchsampler
Last change on this file since aab682e was aab682e, checked in by Martin Hermant <martin.hermant@gmail.com>, 3 years ago

unify version parsing in Version.py

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