annotate modules-and-plug-ins/python-module/setup.py @ 109:edb071c0cd1f
Fixed numpy include problem in python module example
author |
Adam Stark <adamstark.uk@gmail.com> |
date |
Sat, 30 Dec 2017 23:48:41 +0000 |
parents |
2716b8d1b8ad |
children |
0fdaf082ad1a |
rev |
line source |
adamstark@51
|
1 # setup.py
|
adamstark@51
|
2 # build command : python setup.py build build_ext --inplace
|
adamstark@51
|
3 from numpy.distutils.core import setup, Extension
|
adamstark@51
|
4 import os, numpy
|
adamstark@51
|
5
|
adamstark@51
|
6 name = 'btrack'
|
adamstark@51
|
7 sources = ['btrack_python_module.cpp','../../src/OnsetDetectionFunction.cpp','../../src/BTrack.cpp']
|
adamstark@51
|
8
|
adamstark@93
|
9 sources.append ('../../libs/kiss_fft130/kiss_fft.c')
|
adamstark@93
|
10
|
adamstark@51
|
11 include_dirs = [
|
adamstark@51
|
12 numpy.get_include(),'/usr/local/include'
|
adamstark@51
|
13 ]
|
adamstark@51
|
14
|
adamstark@93
|
15 include_dirs.append ('../../libs/kiss_fft130')
|
adamstark@93
|
16
|
adamstark@51
|
17 setup( name = 'BTrack',
|
adamstark@51
|
18 include_dirs = include_dirs,
|
adamstark@93
|
19 ext_modules = [Extension(name, sources,libraries = ['fftw3','samplerate'],library_dirs = ['/usr/local/lib'],define_macros=[
|
adamstark@94
|
20 ('USE_FFTW', None)])]
|
adamstark@51
|
21 ) |