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