source: setup.py @ f8c75aa

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5
Last change on this file since f8c75aa was 2410f57a, checked in by Paul Brossier <piem@piem.org>, 6 years ago

[py] remove empty init files

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