source: python/setup.py @ 3d30b90

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5sampler
Last change on this file since 3d30b90 was 913a7f1, checked in by Paul Brossier <piem@piem.org>, 9 years ago

python/ext/py-musicutils.{c,h}: first .c and test

  • Property mode set to 100755
File size: 2.8 KB
RevLine 
[9aa0af3]1#! /usr/bin/env python
[c71e405]2
[16f8dcc]3from setuptools import setup, Extension
[4d3b573]4
[14fb15f]5import sys
[012b324]6import os.path
[4ebd189]7import numpy
[012b324]8
[945e26d]9# read from VERSION
[ad5203c]10for l in open('VERSION').readlines(): exec (l.strip())
[945e26d]11__version__ = '.'.join \
12        ([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \
13        + AUBIO_VERSION_STATUS
14
[4d3b573]15
[41399bd]16include_dirs = []
17library_dirs = []
18define_macros = []
[4d3b573]19extra_link_args = []
[012b324]20
[41399bd]21include_dirs += ['ext']
22include_dirs += [ numpy.get_include() ]
[ad5203c]23
[4d3b573]24if sys.platform.startswith('darwin'):
25    extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
26
[ad5203c]27output_path = 'gen'
[41399bd]28generated_object_files = []
[ad5203c]29
30if not os.path.isdir(output_path):
[92c83ccc]31    from lib.generator import generate_object_files
[ad5203c]32    generated_object_files = generate_object_files(output_path)
[41399bd]33    # define include dirs
[ad5203c]34else:
35    import glob
36    generated_object_files = glob.glob(os.path.join(output_path, '*.c'))
[41399bd]37include_dirs += [output_path]
38
39if os.path.isfile('../src/aubio.h'):
40    define_macros += [('USE_LOCAL_AUBIO', 1)]
41    include_dirs += ['../src'] # aubio.h
42    include_dirs += ['../build/src'] # config.h
43    library_dirs += ['../build/src']
[ad5203c]44
[164980f]45aubio_extension = Extension("aubio._aubio", [
[4d3b573]46    "ext/aubiomodule.c",
47    "ext/aubioproxy.c",
48    "ext/ufuncs.c",
[913a7f1]49    "ext/py-musicutils.c",
[4d3b573]50    "ext/py-cvec.c",
51    # example without macro
52    "ext/py-filter.c",
53    # macroised
54    "ext/py-filterbank.c",
55    "ext/py-fft.c",
56    "ext/py-phasevoc.c",
[d27634d]57    "ext/py-source.c",
[f1100a4]58    "ext/py-sink.c",
[4d3b573]59    # generated files
60    ] + generated_object_files,
61    include_dirs = include_dirs,
62    library_dirs = library_dirs,
63    extra_link_args = extra_link_args,
64    define_macros = define_macros,
65    libraries=['aubio'])
[14fb15f]66
[945e26d]67classifiers = [
[4d3b573]68    'Development Status :: 4 - Beta',
69    'Environment :: Console',
70    'Intended Audience :: Science/Research',
71    'Topic :: Software Development :: Libraries',
72    'Topic :: Multimedia :: Sound/Audio :: Analysis',
73    'Topic :: Multimedia :: Sound/Audio :: Sound Synthesis',
74    'Operating System :: POSIX',
75    'Operating System :: MacOS :: MacOS X',
76    'Operating System :: Microsoft :: Windows',
77    'Programming Language :: C',
78    'Programming Language :: Python',
79    'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)',
80    ]
[012b324]81
[945e26d]82distrib = setup(name='aubio',
[4d3b573]83    version = __version__,
84    packages = ['aubio'],
[9582713]85    package_dir = {'aubio':'lib/aubio'},
86    scripts = ['scripts/aubiocut'],
[4d3b573]87    ext_modules = [aubio_extension],
88    description = 'interface to the aubio library',
89    long_description = 'interface to the aubio library',
90    license = 'GNU/GPL version 3',
91    author = 'Paul Brossier',
92    author_email = 'piem@aubio.org',
93    maintainer = 'Paul Brossier',
94    maintainer_email = 'piem@aubio.org',
95    url = 'http://aubio.org/',
96    platforms = 'any',
97    classifiers = classifiers,
[16f8dcc]98    install_requires = ['numpy'],
[4d3b573]99    )
Note: See TracBrowser for help on using the repository browser.