forked from fritzo/kazoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·128 lines (118 loc) · 2.95 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#!/usr/bin/python
"""setup.py
Description:
Builds transforms module for analysis and synthesis.
Installs _kazoo and kazoo.
Usage:
python setup_kazoo.py build
- compiles the library from source
(requires compiler version appropriate to this Python build;
run with the python executable which will be used to run this extension)
python setup_kazoo.py install
- installs the library for use (building it first, if needed)
Required Libraries:
FFTW3 - GPL/commercial - http://www.fftw.org
PortAudio v19 - plain MIT - http://www.portaudio.com
SDL 1.2 - GNU LGPL - http://www.libsdl.org
LAPACK/BLAS - Berkeley style - http://www.netlib.org/lapack
"""
# see http://docs.python.org/extending/
from distutils.core import setup, Extension
for line in file('src/__init__.py').readlines():
if line.startswith('__version__'):
exec(line.strip())
kazoo_module = Extension(
'_kazoo',
language = 'c++',
sources = [
'src/_kazoo.cpp',
'src/common.cpp',
'src/fft.cpp',
'src/vectors.cpp',
'src/threads.cpp',
'src/splines.cpp',
'src/spectrogram.cpp',
'src/reassign.cpp',
'src/synchrony.cpp',
'src/transforms.cpp',
'src/psycho.cpp',
'src/audio.cpp',
'src/animate.cpp',
'src/images.cpp',
'src/events.cpp',
],
depends = [
'src/__init__.py',
'src/_kazoo.h',
'src/common.h',
'src/fft.h',
'src/vectors.h',
'src/window.h',
'src/threads.h',
'src/splines.h',
'src/spectrogram.h',
'src/reassign.h',
'src/synchrony.h',
'src/transforms.h',
'src/psycho.h',
'src/audio.h',
'src/animate.h',
'src/images.h',
'src/array.h',
'src/sym33.h',
'src/events.h',
],
library_dirs = [ '/usr/local/lib' ],
libraries = [
'm',
#'blas',
#'lapack',
'fftw3f',
'tbb',
'portaudio',
'SDL',
],
define_macros = [
#('KAZOO_NDEBUG', None),
('KAZOO_IMAGES_COLOR', None),
],
extra_compile_args = [
'-std=c++0x',
'-Wall',
#'-Wextra',
'-Winit-self',
'-Wno-write-strings',
#'-Winline',
#'-Wdisable-optimization',
'-ggdb',
'-O3',
'-pipe',
'-march=native',
#'-fno-exceptions',
#'-fno-rtti',
'-ffast-math',
'-funswitch-loops',
#'-malign-double',
#'-fomit-frame-pointer',
#'-funsafe-math-optimizations',
#'-fsingle-precision-constant',
#'-m32',
#'-mmmx',
#'-msse',
#'-msse2',
#'-msse3',
#'-mfpmath=sse',
],
extra_link_args = [
#'-rdynamic',
],
)
setup(
name = 'kazoo',
version = __version__,
url = 'http://obermeyer.svnrepository.com/svn/kazoo',
description = 'Streaming audio transforms',
packages = [ 'kazoo', 'kazoo.example' ],
package_dir = {'kazoo' : 'src'},
ext_modules = [kazoo_module],
)