- Timestamp:
- May 14, 2016, 9:45:03 PM (9 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- 6e8b8f4
- Parents:
- 283bb90
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
setup.py
r283bb90 r2675227 1 1 #! /usr/bin/env python 2 2 3 import sys 4 import os.path 3 import sys, os.path, glob 5 4 import numpy 6 5 from setuptools import setup, Extension 7 from python.lib.moresetuptools import CleanGenerated, GenerateCommand6 from python.lib.moresetuptools import * 8 7 # function to generate gen/*.{c,h} 9 8 from python.lib.gen_external import generate_external, header, output_path … … 27 26 extra_link_args += ['-framework','CoreFoundation', '-framework','AudioToolbox'] 28 27 29 if os.path.isfile('src/aubio.h'): 30 define_macros += [('USE_LOCAL_AUBIO', 1)] 31 include_dirs += ['src'] # aubio.h 32 library_dirs += ['build/src'] 28 sources = glob.glob(os.path.join('python', 'ext', '*.c')) 33 29 34 aubio_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), 30 aubio_extension = Extension("aubio._aubio", 31 sources, 48 32 include_dirs = include_dirs, 49 33 library_dirs = library_dirs, 50 34 extra_link_args = extra_link_args, 51 define_macros = define_macros, 52 libraries=['aubio']) 35 define_macros = define_macros) 36 37 if os.path.isfile('src/aubio.h'): 38 # if aubio headers are found in this directory 39 add_local_aubio_header(aubio_extension) 40 # was waf used to build the shared lib? 41 if os.path.isdir(os.path.join('build','src')): 42 # link against build/src/libaubio, built with waf 43 add_local_aubio_lib(aubio_extension) 44 else: 45 # add libaubio sources and look for optional deps with pkg-config 46 add_local_aubio_sources(aubio_extension) 47 __version__ += '_libaubio' 48 else: 49 # look for aubio headers and lib using pkg-config 50 add_system_aubio(aubio_extension) 51 52 53 # generate files if they don't exit 54 aubio_extension.sources += generate_external(header, output_path, overwrite = False) 53 55 54 56 classifiers = [
Note: See TracChangeset
for help on using the changeset viewer.