-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
48 lines (40 loc) · 1.15 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
import os
import platform
from distutils.core import setup
from distutils.extension import Extension
from Cython.Build import cythonize
if platform.system() == "Darwin":
os.environ['LDFLAGS'] = " ".join([
"-framework CoreFoundation",
# "-framework AudioUnit",
"-framework AudioToolbox",
"-framework CoreAudio",
])
extensions = [
Extension("minima",
sources=["minima.pyx"],
define_macros = [],
include_dirs=[
"miniaudio",
],
libraries = [
'm',
'dl',
'pthread',
],
library_dirs=[],
extra_objects=["miniaudio/libminiaudio.a"],
# extra_compile_args = ["-isystem miniaudio"],
),
]
setup(
name="minima",
ext_modules=cythonize(extensions,
compiler_directives={
'language_level' : '3',
'embedsignature': True,
# 'cdivision': True, # use C division instead of Python
# 'boundscheck': True, # check arrays boundaries
# 'wraparound': False, # allow negative indexes to fetch the end of an array
}),
)