Mercurial > hg > btrack
comparison modules-and-plug-ins/python-module/setup.py @ 117:ca2d83d29814 tip master
Merge branch 'release/1.0.5'
author | Adam Stark <adamstark.uk@gmail.com> |
---|---|
date | Fri, 18 Aug 2023 20:07:33 +0200 |
parents | 0fdaf082ad1a |
children |
comparison
equal
deleted
inserted
replaced
96:c58f01834337 | 117:ca2d83d29814 |
---|---|
1 # setup.py | 1 # setup.py |
2 # build command : python setup.py build build_ext --inplace | 2 # build command : python setup.py build build_ext --inplace |
3 from numpy.distutils.core import setup, Extension | 3 from numpy.distutils.core import setup, Extension |
4 import os, numpy | 4 import os, numpy, platform |
5 | |
6 if platform.machine() == 'arm64': | |
7 include_path = '/opt/homebrew/include' | |
8 library_path = '/opt/homebrew/lib' | |
9 else: | |
10 include_path = '/usr/local/include' | |
11 library_path = '/usr/local/lib' | |
5 | 12 |
6 name = 'btrack' | 13 name = 'btrack' |
7 sources = ['btrack_python_module.cpp','../../src/OnsetDetectionFunction.cpp','../../src/BTrack.cpp'] | 14 sources = [ |
15 'btrack_python_module.cpp', | |
16 '../../src/OnsetDetectionFunction.cpp', | |
17 '../../src/BTrack.cpp' | |
18 ] | |
8 | 19 |
9 sources.append ('../../libs/kiss_fft130/kiss_fft.c') | 20 sources.append ('../../libs/kiss_fft130/kiss_fft.c') |
10 | 21 |
11 include_dirs = [ | 22 include_dirs = [ |
12 numpy.get_include(),'/usr/local/include' | 23 numpy.get_include(), |
13 ] | 24 include_path |
25 ] | |
14 | 26 |
15 include_dirs.append ('../../libs/kiss_fft130') | 27 include_dirs.append ('../../libs/kiss_fft130') |
16 | 28 |
17 setup( name = 'BTrack', | 29 setup(name = 'BTrack', |
18 include_dirs = include_dirs, | 30 include_dirs = include_dirs, |
19 ext_modules = [Extension(name, sources,libraries = ['fftw3','samplerate'],library_dirs = ['/usr/local/lib'],define_macros=[ | 31 ext_modules = [Extension(name, sources,libraries = ['fftw3','samplerate'],library_dirs = [library_path],define_macros=[ |
20 ('USE_FFTW', None)])] | 32 ('USE_FFTW', None)])] |
21 ) | 33 ) |