source: setup.py @ f77820d

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampler
Last change on this file since f77820d was b991cc1, checked in by Martin Hermant <martin.hermant@gmail.com>, 8 years ago

change version.py => this_version.py

  • 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
[2675227]5from python.lib.moresetuptools import *
[1167631]6# function to generate gen/*.{c,h}
7from python.lib.gen_external import generate_external, header, output_path
[b991cc1]8from this_version import get_aubio_version, get_aubio_pyversion
[012b324]9
[1eb8c0e]10__version__ = get_aubio_version()
11__pip_version__ = get_aubio_pyversion()
[945e26d]12
[41399bd]13include_dirs = []
14library_dirs = []
[c8c7aa6]15define_macros = [('AUBIO_VERSION', '%s' % __version__)]
[4d3b573]16extra_link_args = []
[012b324]17
[1167631]18include_dirs += [ 'python/ext' ]
[a89ed31]19include_dirs += [ output_path ] # aubio-generated.h
[5f6324e]20try:
21    import numpy
22    include_dirs += [ numpy.get_include() ]
23except ImportError:
24    pass
[ad5203c]25
[4d3b573]26if sys.platform.startswith('darwin'):
27    extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
28
[2e40231]29sources = sorted(glob.glob(os.path.join('python', 'ext', '*.c')))
[2675227]30
31aubio_extension = Extension("aubio._aubio",
32    sources,
[4d3b573]33    include_dirs = include_dirs,
34    library_dirs = library_dirs,
35    extra_link_args = extra_link_args,
[2675227]36    define_macros = define_macros)
37
38if os.path.isfile('src/aubio.h'):
[8d09036]39    if not os.path.isdir(os.path.join('build','src')):
[95bcdec]40        pass
41        #__version__ += 'a2' # python only version
[2675227]42
[945e26d]43classifiers = [
[4d3b573]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    ]
[012b324]57
[945e26d]58distrib = setup(name='aubio',
[1eb8c0e]59    version = __pip_version__,
[4d3b573]60    packages = ['aubio'],
[1167631]61    package_dir = {'aubio':'python/lib/aubio'},
62    scripts = ['python/scripts/aubiocut'],
[4d3b573]63    ext_modules = [aubio_extension],
[dc1fbc6]64    description = 'a collection of tools for music analysis',
65    long_description = 'a collection of tools for music analysis',
[4d3b573]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',
[0f425aa]71    url = 'https://aubio.org/',
[4d3b573]72    platforms = 'any',
73    classifiers = classifiers,
[16f8dcc]74    install_requires = ['numpy'],
[6264d30]75    setup_requires = ['numpy'],
[a89ed31]76    cmdclass = {
77        'clean': CleanGenerated,
[b1d37c0]78        'build_ext': build_ext,
[1167631]79        },
80    test_suite = 'nose2.collector.collector',
[6264d30]81    extras_require = {
82        'tests': ['numpy'],
83        },
[4d3b573]84    )
Note: See TracBrowser for help on using the repository browser.