source: python/setup.py @ 41399bd

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

ext/aubio-types.h: use -DLOCAL_AUBIO to build against local aubio

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