[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 | |
---|
[945e26d] | 20 | aubio_extension = Extension("aubio._aubio", |
---|
| 21 | ["aubiomodule.c", |
---|
[b3130e2] | 22 | "aubioproxy.c", |
---|
[615ac7d] | 23 | "py-cvec.c", |
---|
[b3130e2] | 24 | # example without macro |
---|
[615ac7d] | 25 | "py-filter.c", |
---|
[b3130e2] | 26 | # macroised |
---|
[615ac7d] | 27 | "py-filterbank.c", |
---|
| 28 | "py-fft.c", |
---|
| 29 | "py-phasevoc.c", |
---|
| 30 | # generated files |
---|
[c71e405] | 31 | ] + generate_object_files(), |
---|
[945e26d] | 32 | include_dirs = include_dirs + [ numpy.get_include() ], |
---|
| 33 | library_dirs = library_dirs, |
---|
| 34 | libraries=['aubio']) |
---|
| 35 | |
---|
[14fb15f] | 36 | if sys.platform.startswith('darwin'): |
---|
| 37 | aubio_extension.extra_link_args = ['-framework','CoreFoundation', '-framework','AudioToolbox'] |
---|
| 38 | |
---|
[945e26d] | 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 | ] |
---|
[012b324] | 53 | |
---|
[945e26d] | 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 | ) |
---|
[0a6c211] | 69 | |
---|