1 | #! /usr/bin/python |
---|
2 | |
---|
3 | from distutils.core import setup, Extension |
---|
4 | from generator import generate_object_files |
---|
5 | import sys |
---|
6 | import os.path |
---|
7 | import numpy |
---|
8 | |
---|
9 | # read from VERSION |
---|
10 | for l in open(os.path.join('..','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 | library_dirs = ['../build/src', '../src/.libs'] |
---|
16 | include_dirs = ['../build/src', '../src', '.' ] |
---|
17 | library_dirs = filter (lambda x: os.path.isdir(x), library_dirs) |
---|
18 | include_dirs = filter (lambda x: os.path.isdir(x), include_dirs) |
---|
19 | |
---|
20 | aubio_extension = Extension("aubio._aubio", [ |
---|
21 | "ext/aubiomodule.c", |
---|
22 | "ext/aubioproxy.c", |
---|
23 | "ext/ufuncs.c", |
---|
24 | "ext/py-cvec.c", |
---|
25 | # example without macro |
---|
26 | "ext/py-filter.c", |
---|
27 | # macroised |
---|
28 | "ext/py-filterbank.c", |
---|
29 | "ext/py-fft.c", |
---|
30 | "ext/py-phasevoc.c", |
---|
31 | # generated files |
---|
32 | ] + generate_object_files(), |
---|
33 | include_dirs = include_dirs + [ numpy.get_include() ], |
---|
34 | library_dirs = library_dirs, |
---|
35 | libraries=['aubio']) |
---|
36 | |
---|
37 | if sys.platform.startswith('darwin'): |
---|
38 | aubio_extension.extra_link_args = ['-framework','CoreFoundation', '-framework','AudioToolbox'] |
---|
39 | |
---|
40 | classifiers = [ |
---|
41 | 'Development Status :: 4 - Beta', |
---|
42 | 'Environment :: Console', |
---|
43 | 'Intended Audience :: Science/Research', |
---|
44 | 'Topic :: Software Development :: Libraries', |
---|
45 | 'Topic :: Multimedia :: Sound/Audio :: Analysis', |
---|
46 | 'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis', |
---|
47 | 'Operating System :: POSIX', |
---|
48 | 'Operating System :: MacOS :: MacOS X', |
---|
49 | 'Operating System :: Microsoft :: Windows', |
---|
50 | 'Programming Language :: C', |
---|
51 | 'Programming Language :: Python', |
---|
52 | 'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)', |
---|
53 | ] |
---|
54 | |
---|
55 | distrib = setup(name='aubio', |
---|
56 | version = __version__, |
---|
57 | packages = ['aubio'], |
---|
58 | ext_modules = [aubio_extension], |
---|
59 | description = 'interface to the aubio library', |
---|
60 | long_description = 'interface to the aubio library', |
---|
61 | license = 'GNU/GPL version 3', |
---|
62 | author = 'Paul Brossier', |
---|
63 | author_email = 'piem@aubio.org', |
---|
64 | maintainer = 'Paul Brossier', |
---|
65 | maintainer_email = 'piem@aubio.org', |
---|
66 | url = 'http://aubio.org/', |
---|
67 | platforms = 'any', |
---|
68 | classifiers = classifiers, |
---|
69 | ) |
---|
70 | |
---|