source: setup.py @ 8c50194

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

Merge branch 'aubiocmd'

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