source: python/setup.py @ 7606d23

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

setup.py: improve, update MANIFEST.in

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