source: setup.py @ 671eae1

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampleryinfft+
Last change on this file since 671eae1 was 95bcdec, checked in by Paul Brossier <piem@piem.org>, 8 years ago

setup.py: remove status from version string

  • Property mode set to 100755
File size: 2.9 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# read from VERSION
10for l in open('VERSION').readlines(): exec (l.strip())
11
12if AUBIO_MAJOR_VERSION is None or AUBIO_MINOR_VERSION is None \
13        or AUBIO_PATCH_VERSION is None:
14    raise SystemError("Failed parsing VERSION file.")
15
16__version__ = '.'.join(map(str, [AUBIO_MAJOR_VERSION,
17                                 AUBIO_MINOR_VERSION,
18                                 AUBIO_PATCH_VERSION]))
19if AUBIO_VERSION_STATUS is not None:
20    if AUBIO_VERSION_STATUS.startswith('~'):
21        AUBIO_VERSION_STATUS = AUBIO_VERSION_STATUS[1:]
22    #__version__ += AUBIO_VERSION_STATUS
23
24include_dirs = []
25library_dirs = []
26define_macros = []
27extra_link_args = []
28
29include_dirs += [ 'python/ext' ]
30include_dirs += [ output_path ] # aubio-generated.h
31try:
32    import numpy
33    include_dirs += [ numpy.get_include() ]
34except ImportError:
35    pass
36
37if sys.platform.startswith('darwin'):
38    extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
39
40sources = sorted(glob.glob(os.path.join('python', 'ext', '*.c')))
41
42aubio_extension = Extension("aubio._aubio",
43    sources,
44    include_dirs = include_dirs,
45    library_dirs = library_dirs,
46    extra_link_args = extra_link_args,
47    define_macros = define_macros)
48
49if os.path.isfile('src/aubio.h'):
50    if not os.path.isdir(os.path.join('build','src')):
51        pass
52        #__version__ += 'a2' # python only version
53
54classifiers = [
55    'Development Status :: 4 - Beta',
56    'Environment :: Console',
57    'Intended Audience :: Science/Research',
58    'Topic :: Software Development :: Libraries',
59    'Topic :: Multimedia :: Sound/Audio :: Analysis',
60    'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis',
61    'Operating System :: POSIX',
62    'Operating System :: MacOS :: MacOS X',
63    'Operating System :: Microsoft :: Windows',
64    'Programming Language :: C',
65    'Programming Language :: Python',
66    'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
67    ]
68
69distrib = setup(name='aubio',
70    version = __version__,
71    packages = ['aubio'],
72    package_dir = {'aubio':'python/lib/aubio'},
73    scripts = ['python/scripts/aubiocut'],
74    ext_modules = [aubio_extension],
75    description = 'a collection of tools for music analysis',
76    long_description = 'a collection of tools for music analysis',
77    license = 'GNU/GPL version 3',
78    author = 'Paul Brossier',
79    author_email = 'piem@aubio.org',
80    maintainer = 'Paul Brossier',
81    maintainer_email = 'piem@aubio.org',
82    url = 'http://aubio.org/',
83    platforms = 'any',
84    classifiers = classifiers,
85    install_requires = ['numpy'],
86    cmdclass = {
87        'clean': CleanGenerated,
88        'build_ext': build_ext,
89        },
90    test_suite = 'nose2.collector.collector',
91    )
Note: See TracBrowser for help on using the repository browser.