[c71e405] | 1 | #! /usr/bin/python |
---|
| 2 | |
---|
[0a6c211] | 3 | from distutils.core import setup, Extension |
---|
[c71e405] | 4 | from generator import generate_object_files |
---|
[14fb15f] | 5 | import sys |
---|
[012b324] | 6 | import os.path |
---|
[4ebd189] | 7 | import numpy |
---|
[012b324] | 8 | |
---|
[945e26d] | 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 | |
---|
[25c9f9a] | 15 | library_dirs = ['../build/src', '../src/.libs'] |
---|
| 16 | include_dirs = ['../build/src', '../src', '.' ] |
---|
[012b324] | 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 | |
---|
[164980f] | 20 | aubio_extension = Extension("aubio._aubio", [ |
---|
| 21 | "ext/aubiomodule.c", |
---|
| 22 | "ext/aubioproxy.c", |
---|
| 23 | "ext/ufuncs.c", |
---|
| 24 | "ext/py-cvec.c", |
---|
[b3130e2] | 25 | # example without macro |
---|
[164980f] | 26 | "ext/py-filter.c", |
---|
[b3130e2] | 27 | # macroised |
---|
[164980f] | 28 | "ext/py-filterbank.c", |
---|
| 29 | "ext/py-fft.c", |
---|
| 30 | "ext/py-phasevoc.c", |
---|
[615ac7d] | 31 | # generated files |
---|
[c71e405] | 32 | ] + generate_object_files(), |
---|
[945e26d] | 33 | include_dirs = include_dirs + [ numpy.get_include() ], |
---|
| 34 | library_dirs = library_dirs, |
---|
| 35 | libraries=['aubio']) |
---|
| 36 | |
---|
[14fb15f] | 37 | if sys.platform.startswith('darwin'): |
---|
| 38 | aubio_extension.extra_link_args = ['-framework','CoreFoundation', '-framework','AudioToolbox'] |
---|
| 39 | |
---|
[945e26d] | 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 | ] |
---|
[012b324] | 54 | |
---|
[945e26d] | 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 | ) |
---|
[0a6c211] | 70 | |
---|