source: setup.py @ 1167631

feature/autosinkfeature/cnnfeature/cnn_orgfeature/constantqfeature/crepefeature/crepe_orgfeature/pitchshiftfeature/pydocstringsfeature/timestretchfix/ffmpeg5pitchshiftsamplertimestretchyinfft+
Last change on this file since 1167631 was 1167631, checked in by Paul Brossier <piem@piem.org>, 8 years ago

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

  • Property mode set to 100755
File size: 2.9 KB
RevLine 
[9aa0af3]1#! /usr/bin/env python
[c71e405]2
[14fb15f]3import sys
[012b324]4import os.path
[4ebd189]5import numpy
[1167631]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
[012b324]10
[945e26d]11# read from VERSION
[ad5203c]12for l in open('VERSION').readlines(): exec (l.strip())
[945e26d]13__version__ = '.'.join \
14        ([str(x) for x in [AUBIO_MAJOR_VERSION, AUBIO_MINOR_VERSION, AUBIO_PATCH_VERSION]]) \
15        + AUBIO_VERSION_STATUS
16
[41399bd]17include_dirs = []
18library_dirs = []
19define_macros = []
[4d3b573]20extra_link_args = []
[012b324]21
[1167631]22include_dirs += [ 'python/ext' ]
[a89ed31]23include_dirs += [ output_path ] # aubio-generated.h
[41399bd]24include_dirs += [ numpy.get_include() ]
[ad5203c]25
[4d3b573]26if sys.platform.startswith('darwin'):
27    extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
28
[1167631]29if os.path.isfile('src/aubio.h'):
[41399bd]30    define_macros += [('USE_LOCAL_AUBIO', 1)]
[1167631]31    include_dirs += ['src'] # aubio.h
32    library_dirs += ['build/src']
[ad5203c]33
[164980f]34aubio_extension = Extension("aubio._aubio", [
[1167631]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",
[a89ed31]46    # generate files if they don't exit
[1167631]47    ] + generate_external(header, output_path, overwrite = False),
[4d3b573]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'])
[14fb15f]53
[945e26d]54classifiers = [
[4d3b573]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    ]
[012b324]68
[945e26d]69distrib = setup(name='aubio',
[4d3b573]70    version = __version__,
71    packages = ['aubio'],
[1167631]72    package_dir = {'aubio':'python/lib/aubio'},
73    scripts = ['python/scripts/aubiocut'],
[4d3b573]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,
[16f8dcc]85    install_requires = ['numpy'],
[a89ed31]86    cmdclass = {
87        'clean': CleanGenerated,
88        'generate': GenerateCommand,
[1167631]89        },
90    test_suite = 'nose2.collector.collector',
[4d3b573]91    )
Note: See TracBrowser for help on using the repository browser.