blob: f5c91c6b5bd8f1a066bb02e26e2060a59bd63b3d (
plain)
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
|
cflags=(\
-fwrapv\
-D NDEBUG\
-D Py_BUILD_CORE\
-I include\
-I '$dir' \
-I '$srcdir'/Include\
)
srcs=(\
Modules/^(\
getbuildinfo.c.o\
getpath.c.o\
main.c\
gcmodule.c\
`{awk -f modules.awk Setup | sort -u}\
)\
Objects/^(\
abstract.c\
accu.c\
boolobject.c\
bytes_methods.c\
bytearrayobject.c\
bytesobject.c\
cellobject.c\
classobject.c\
codeobject.c\
complexobject.c\
descrobject.c\
enumobject.c\
exceptions.c\
genobject.c\
fileobject.c\
floatobject.c\
frameobject.c\
funcobject.c\
iterobject.c\
listobject.c\
longobject.c\
dictobject.c\
odictobject.c\
memoryobject.c\
methodobject.c\
moduleobject.c\
namespaceobject.c\
object.c\
obmalloc.c\
capsule.c\
rangeobject.c\
setobject.c\
sliceobject.c\
structseq.c\
tupleobject.c\
typeobject.c\
unicodeobject.c\
unicodectype.c\
weakrefobject.c\
)\
Parser/^(\
acceler.c\
grammar1.c\
listnode.c\
node.c\
parser.c\
bitset.c\
metagrammar.c\
firstsets.c\
grammar.c\
pgen.c\
myreadline.c parsetok.c tokenizer.c\
)\
Python/^(\
_warnings.c\
Python-ast.c\
asdl.c\
ast.c\
bltinmodule.c\
ceval.c\
compile.c\
codecs.c\
dynamic_annotations.c\
errors.c\
frozenmain.c\
future.c\
getargs.c\
getcompiler.c\
getcopyright.c\
getplatform.c.o\
getversion.c\
graminit.c\
import.c\
importdl.c\
marshal.c\
modsupport.c\
mystrtoul.c\
mysnprintf.c\
peephole.c\
pyarena.c\
pyctype.c\
pyfpe.c\
pyhash.c\
pylifecycle.c\
pymath.c\
pystate.c\
pythonrun.c\
pytime.c\
random.c\
structmember.c\
symtable.c\
sysmodule.c.o\
traceback.c\
getopt.c\
pystrcmp.c\
pystrtod.c\
pystrhex.c\
dtoa.c\
formatter_unicode.c\
fileutils.c\
dynload_stub.c\
thread.c\
frozen.c\
)\
'$outdir'/config.c\
)
checkstatus
libs=()
deps=()
if(grep -q '^_ctypes' Setup) {
cflags=($cflags -I '$builddir'/pkg/libffi/include)
deps=($deps pkg/libffi/headers)
libs=($libs libffi/libffi.a)
}
if(grep -qE '^(_hashlib|_ssl)' Setup) {
cflags=($cflags -I '$builddir'/pkg/libressl/include)
deps=($deps pkg/libressl/headers)
libs=($libs (libressl/^(libssl.a libcrypto.a) openbsd/libbsd.a))
}
if(grep -q '^pyexpat' Setup) {
cflags=($cflags -I '$builddir'/pkg/expat/include)
deps=($deps pkg/expat/headers)
libs=($libs expat/libexpat.a.d)
}
if(grep -q '^zlib' Setup) {
cflags=($cflags -I '$builddir'/pkg/zlib/include)
deps=($deps pkg/zlib/headers)
libs=($libs zlib/libz.a)
}
rule makesetup 'cd $outdir && $$OLDPWD/$srcdir/Modules/makesetup -s $$OLDPWD/$srcdir -m - $$OLDPWD/$in'
build '$outdir'/config.c makesetup '$dir'/Setup '|' '$srcdir'/Modules/^(makesetup config.c.in)
cflags $cflags
cc Modules/getbuildinfo.c ; with\
cflags '$cflags -D ''DATE="Dec 22 2016"'' -D ''TIME="18:38:47"'''
cc Modules/getpath.c ; defs='-D '''^(\
'PYTHONPATH='":plat-linux"\
'PREFIX='"/"\
'EXEC_PREFIX='"/"\
'VERSION='"3.6"\
'VPATH='""\
)^'''' with cflags '$cflags '$"defs
platform=linux
abiflags=''
if(grep -q '^#define WITH_PYMALLOC 1' pyconfig.h)
abiflags=$abiflags^m
if(grep -q '^#define Py_DEBUG 1' pyconfig.h)
abiflags=$abiflags^d
cc Python/getplatform.c ; with cflags '$cflags -D PLATFORM=''"'$platform'"'''
cc Python/sysmodule.c ; with cflags '$cflags -D ABIFLAGS=''"'$abiflags'"'''
phony deps $deps
lib libpython.a -d '$dir'/deps $srcs
exe python Programs/python.c libpython.a '$builddir'/pkg/$libs
file bin/python3 '$outdir'/python 755
sym bin/python python3
pylibs=`{grep -v '^#' pylibs.txt}
checkstatus
for(f in $pylibs)
file lib/python3.6/$f '$srcdir'/Lib/$f 644
file lib/python3.6/_sysconfigdata_$abiflags^_$platform^_.py '$dir'/lib/_sysconfigdata.py 644
file lib/python3.6/Makefile '$dir'/lib/Makefile 644
dir lib/python3.6/lib-dynload 755
gen_inputs='$dir'/^(Setup modules.awk pyconfig.h)
fetch curl
|