source: setup.py @ 2410f57a

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

[py] remove empty init files

  • Property mode set to 100755
File size: 2.7 KB
RevLine 
[9aa0af3]1#! /usr/bin/env python
[c71e405]2
[2675227]3import sys, os.path, glob
[1167631]4from setuptools import setup, Extension
[2410f57a]5
6# add ./python/lib to current path
7sys.path.append(os.path.join('python', 'lib'))
8from moresetuptools import build_ext, CleanGenerated
9
[1167631]10# function to generate gen/*.{c,h}
[b991cc1]11from this_version import get_aubio_version, get_aubio_pyversion
[012b324]12
[38f3d04]13__version__ = get_aubio_pyversion()
14__aubio_version__ = get_aubio_version()
[945e26d]15
[41399bd]16include_dirs = []
17library_dirs = []
[38f3d04]18define_macros = [('AUBIO_VERSION', '%s' % __aubio_version__)]
[4d3b573]19extra_link_args = []
[012b324]20
[1167631]21include_dirs += [ 'python/ext' ]
[5f6324e]22try:
23    import numpy
24    include_dirs += [ numpy.get_include() ]
25except ImportError:
26    pass
[ad5203c]27
[4d3b573]28if sys.platform.startswith('darwin'):
29    extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
30
[2e40231]31sources = sorted(glob.glob(os.path.join('python', 'ext', '*.c')))
[2675227]32
33aubio_extension = Extension("aubio._aubio",
34    sources,
[4d3b573]35    include_dirs = include_dirs,
36    library_dirs = library_dirs,
37    extra_link_args = extra_link_args,
[2675227]38    define_macros = define_macros)
39
40if os.path.isfile('src/aubio.h'):
[8d09036]41    if not os.path.isdir(os.path.join('build','src')):
[95bcdec]42        pass
43        #__version__ += 'a2' # python only version
[2675227]44
[945e26d]45classifiers = [
[4d3b573]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    ]
[012b324]59
[945e26d]60distrib = setup(name='aubio',
[38f3d04]61    version = __version__,
[4d3b573]62    packages = ['aubio'],
[1167631]63    package_dir = {'aubio':'python/lib/aubio'},
[4d3b573]64    ext_modules = [aubio_extension],
[dc1fbc6]65    description = 'a collection of tools for music analysis',
66    long_description = 'a collection of tools for music analysis',
[4d3b573]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',
[0f425aa]72    url = 'https://aubio.org/',
[4d3b573]73    platforms = 'any',
74    classifiers = classifiers,
[16f8dcc]75    install_requires = ['numpy'],
[6264d30]76    setup_requires = ['numpy'],
[a89ed31]77    cmdclass = {
78        'clean': CleanGenerated,
[b1d37c0]79        'build_ext': build_ext,
[1167631]80        },
[8e2f36a]81    entry_points = {
82        'console_scripts': [
83            'aubio = aubio.cmd:main',
84            'aubiocut = aubio.cut:main',
85        ],
86    },
[1167631]87    test_suite = 'nose2.collector.collector',
[6264d30]88    extras_require = {
89        'tests': ['numpy'],
90        },
[4d3b573]91    )
Note: See TracBrowser for help on using the repository browser.