source: python/setup.py @ 1670f39

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

python/setup.py: no need to include ../build/src

  • Property mode set to 100755
File size: 2.8 KB
Line 
1#! /usr/bin/env python
2
3from setuptools import setup, Extension
4from lib.moresetuptools import CleanGenerated, GenerateCommand
5
6import sys
7import os.path
8import numpy
9
10# read from VERSION
11for l in open('VERSION').readlines(): exec (l.strip())
12__version__ = '.'.join \
13        ([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \
14        + AUBIO_VERSION_STATUS
15
16# function to generate gen/*.{c,h}
17from lib.gen_external import generate_external
18output_path = 'gen'
19
20include_dirs = []
21library_dirs = []
22define_macros = []
23extra_link_args = []
24
25include_dirs += [ 'ext' ]
26include_dirs += [ output_path ] # aubio-generated.h
27include_dirs += [ numpy.get_include() ]
28
29if sys.platform.startswith('darwin'):
30    extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
31
32if os.path.isfile('../src/aubio.h'):
33    define_macros += [('USE_LOCAL_AUBIO', 1)]
34    include_dirs += ['../src'] # aubio.h
35    library_dirs += ['../build/src']
36
37aubio_extension = Extension("aubio._aubio", [
38    "ext/aubiomodule.c",
39    "ext/aubioproxy.c",
40    "ext/ufuncs.c",
41    "ext/py-musicutils.c",
42    "ext/py-cvec.c",
43    # example without macro
44    "ext/py-filter.c",
45    # macroised
46    "ext/py-filterbank.c",
47    "ext/py-fft.c",
48    "ext/py-phasevoc.c",
49    "ext/py-source.c",
50    "ext/py-sink.c",
51    # generate files if they don't exit
52    ] + generate_external(output_path, overwrite = False),
53    include_dirs = include_dirs,
54    library_dirs = library_dirs,
55    extra_link_args = extra_link_args,
56    define_macros = define_macros,
57    libraries=['aubio'])
58
59classifiers = [
60    'Development Status :: 4 - Beta',
61    'Environment :: Console',
62    'Intended Audience :: Science/Research',
63    'Topic :: Software Development :: Libraries',
64    'Topic :: Multimedia :: Sound/Audio :: Analysis',
65    'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis',
66    'Operating System :: POSIX',
67    'Operating System :: MacOS :: MacOS X',
68    'Operating System :: Microsoft :: Windows',
69    'Programming Language :: C',
70    'Programming Language :: Python',
71    'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
72    ]
73
74distrib = setup(name='aubio',
75    version = __version__,
76    packages = ['aubio'],
77    package_dir = {'aubio':'lib/aubio'},
78    scripts = ['scripts/aubiocut'],
79    ext_modules = [aubio_extension],
80    description = 'interface to the aubio library',
81    long_description = 'interface to the aubio library',
82    license = 'GNU/GPL version 3',
83    author = 'Paul Brossier',
84    author_email = 'piem@aubio.org',
85    maintainer = 'Paul Brossier',
86    maintainer_email = 'piem@aubio.org',
87    url = 'http://aubio.org/',
88    platforms = 'any',
89    classifiers = classifiers,
90    install_requires = ['numpy'],
91    cmdclass = {
92        'clean': CleanGenerated,
93        'generate': GenerateCommand,
94        }
95    )
Note: See TracBrowser for help on using the repository browser.