source: setup.py @ fcb6e8c

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampler
Last change on this file since fcb6e8c was 6264d30, checked in by Paul Brossier <piem@piem.org>, 8 years ago

setup.py: add numpy to setup_requires, nose2 to extras_require[tests]

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