-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathcompile.py
executable file
·46 lines (38 loc) · 1.01 KB
/
compile.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
#!/usr/bin/env python
"""
MusicPlayer, https://github.com/albertz/music-player
Copyright (c) 2012, Albert Zeyer, www.az2000.de
All rights reserved.
This code is under the 2-clause BSD license, see License.txt in the root directory of this project.
"""
from glob import glob
from compile_utils import *
import compile_utils as c
try:
import better_exchook
better_exchook.install()
except ImportError:
pass
os.chdir(os.path.dirname(__file__))
sys_exec(["mkdir", "-p", "build"])
os.chdir("build")
StaticChromaprint = False
print("* Building musicplayer.so")
ffmpeg_files = \
sorted(glob("../*.cpp")) + \
(sorted(glob("../chromaprint/*.cpp")) if StaticChromaprint else [])
cc(
ffmpeg_files,
[
"-DHAVE_CONFIG_H",
"-g",
] +
get_python_ccopts() +
(["-I", "../chromaprint"] if StaticChromaprint else [])
)
link(
"../musicplayer.so",
[c.get_cc_outfilename(fn) for fn in ffmpeg_files],
get_python_linkopts() +
([] if StaticChromaprint else ["-lchromaprint"])
)