Changeset 1167631 for setup.py


Ignore:
Timestamp:
May 13, 2016, 6:50:20 PM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
2e324f5
Parents:
c09efca
Message:

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

File:
1 moved

Legend:

Unmodified
Added
Removed
  • setup.py

    rc09efca r1167631  
    11#! /usr/bin/env python
    2 
    3 from setuptools import setup, Extension
    4 from lib.moresetuptools import CleanGenerated, GenerateCommand
    52
    63import sys
    74import os.path
    85import 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
    910
    1011# read from VERSION
     
    1415        + AUBIO_VERSION_STATUS
    1516
    16 # function to generate gen/*.{c,h}
    17 from lib.gen_external import generate_external
    18 output_path = 'gen'
    19 
    2017include_dirs = []
    2118library_dirs = []
     
    2320extra_link_args = []
    2421
    25 include_dirs += [ 'ext' ]
     22include_dirs += [ 'python/ext' ]
    2623include_dirs += [ output_path ] # aubio-generated.h
    2724include_dirs += [ numpy.get_include() ]
     
    3027    extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox']
    3128
    32 if os.path.isfile('../src/aubio.h'):
     29if os.path.isfile('src/aubio.h'):
    3330    define_macros += [('USE_LOCAL_AUBIO', 1)]
    34     include_dirs += ['../src'] # aubio.h
    35     library_dirs += ['../build/src']
     31    include_dirs += ['src'] # aubio.h
     32    library_dirs += ['build/src']
    3633
    3734aubio_extension = Extension("aubio._aubio", [
    38     "ext/aubiomodule.c",
    39     "ext/aubioproxy.c",
    40     "ext/ufuncs.c",
    41     "ext/py-musicutils.c",
    42     "ext/py-cvec.c",
    43     # example without macro
    44     "ext/py-filter.c",
    45     # macroised
    46     "ext/py-filterbank.c",
    47     "ext/py-fft.c",
    48     "ext/py-phasevoc.c",
    49     "ext/py-source.c",
    50     "ext/py-sink.c",
     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",
    5146    # generate files if they don't exit
    52     ] + generate_external(output_path, overwrite = False),
     47    ] + generate_external(header, output_path, overwrite = False),
    5348    include_dirs = include_dirs,
    5449    library_dirs = library_dirs,
     
    7570    version = __version__,
    7671    packages = ['aubio'],
    77     package_dir = {'aubio':'lib/aubio'},
    78     scripts = ['scripts/aubiocut'],
     72    package_dir = {'aubio':'python/lib/aubio'},
     73    scripts = ['python/scripts/aubiocut'],
    7974    ext_modules = [aubio_extension],
    8075    description = 'interface to the aubio library',
     
    9287        'clean': CleanGenerated,
    9388        'generate': GenerateCommand,
    94         }
     89        },
     90    test_suite = 'nose2.collector.collector',
    9591    )
Note: See TracChangeset for help on using the changeset viewer.