source: setup.py @ 1167631

feature/autosinkfeature/constantqfeature/pitchshiftfeature/pydocstringsfeature/timestretchpitchshiftsamplertimestretchyinfft+
Last change on this file since 1167631 was 1167631, checked in by Paul Brossier <piem@piem.org>, 4 years ago

move python/setup.py to setup.py, update Makefile, add requirements

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