-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwscript
More file actions
52 lines (41 loc) · 1.18 KB
/
wscript
File metadata and controls
52 lines (41 loc) · 1.18 KB
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
APPNAME = "ec"
VERSION = "1.2"
def options(opt):
opt.load("compiler_c")
opt.load("python")
opt.load("cython")
def configure(cnf):
cnf.load("compiler_c")
cnf.load("python")
cnf.load("cython")
cnf.check_python_headers()
cnf.env.CYTHONFLAGS = ["--embed", "--annotate", "--fast-fail"]
cnf.env.CFLAGS = ["-O3"]
cnf.env.LINKFLAGS = ["-s"]
def build(bld):
bld(
rule='"${CYTHON}" ${CYTHONFLAGS} -o ${TGT} ${SRC}',
source="src/ec.py",
target="ec.c",
)
bld.program(
features="pyembed",
source="ec.c",
target=APPNAME,
)
def dist(dst):
patterns = [".git"]
warned = False
with open(".gitignore") as f:
for line in f:
line = line.strip()
if line:
if line.startswith('/'):
patterns.append(line[1:])
elif not line.startswith('!'):
patterns.append("**/" + line)
elif not warned:
from waflib import Logs
Logs.warn(".gitignore is most likely to be processed incorrectly")
warned = True
dst.excl = patterns