forked from BobBuildTool/basement
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpython3.yaml
More file actions
157 lines (140 loc) · 5.21 KB
/
python3.yaml
File metadata and controls
157 lines (140 loc) · 5.21 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
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
inherit: [autotools, autoconf, make, patch]
metaEnvironment:
PKG_VERSION: "3.13.2"
privateEnvironment:
APPLY_LIBTOOL_PATCH: "no"
checkoutSCM:
scm: url
url: https://www.python.org/ftp/python/${PKG_VERSION}/Python-${PKG_VERSION}.tar.xz
digestSHA256: "d984bcc57cd67caab26f7def42e523b1c015bbc5dc07836cf4f0b63fa159eb56"
stripComponents: 1
checkoutDeterministic: True
checkoutScript: |
patchApplySeries $<@python3/*@>
# We cannot use out-of-tree builds directly from the source workspace because
# the build somehow manages to create .pyc files in the sources. Setting
# PYTHONDONTWRITEBYTECODE does not suffice.
buildScript: |
autoconfSyncReconfigure $1 src
multiPackage:
"":
depends:
- libs::expat-dev
- libs::gdbm-dev
- libs::libffi-dev
- libs::ncurses-dev
- libs::openssl-dev
- libs::readline-dev
- libs::zlib-dev
- python::python3-setuptools
- python::python3-pip
- python::wheel
- use: []
depends:
- libs::expat-tgt
- libs::gdbm-tgt
- libs::libffi-tgt
- libs::ncurses-tgt
- libs::openssl-tgt
- libs::readline-tgt
- libs::zlib-tgt
buildTools: [python3]
buildVars: [PKG_VERSION]
buildScript: |
export ac_cv_file__dev_ptc=yes
export ac_cv_file__dev_ptmx=yes
export ac_cv_have_long_long_format=yes
export ac_cv_prog_HAS_HG=/bin/false
export ac_cv_working_tzset=yes
autotoolsBuild ../src \
--with-build-python="python${PKG_VERSION%\.*}" \
--disable-bzip2 \
--disable-codecs-cjk \
--disable-idle3 \
--disable-lib2to3 \
--disable-nis \
--disable-ossaudiodev \
--disable-pyc-build \
--disable-pydoc \
--disable-sqlite3 \
--disable-test-modules \
--disable-tk \
--disable-uuid \
--enable-curses \
--enable-readline \
--enable-unicodedata \
--enable-zlib \
--with-expat=system \
--with-libmpdec=none \
--with-system-ffi \
--without-cxx-main \
--without-ensurepip \
rsync -a "${BOB_DEP_PATHS[python::python3-setuptools]}/" install/
rsync -a "${BOB_DEP_PATHS[python::python3-pip]}/" install/
rsync -a "${BOB_DEP_PATHS[python::wheel]}/" install/
multiPackage:
"":
# Host tool to build other python packages
packageScript: |
autotoolsPackageDev
autotoolsPackageTgt
ln -sf python3 usr/bin/python
provideTools:
python3: usr/bin
dev:
packageScript: |
MAJOR_MINOR="${PKG_VERSION%\.*}"
autotoolsPackageDev
mkdir -p usr/lib/python${MAJOR_MINOR}
cp $1/install/usr/lib/python${MAJOR_MINOR}/_sysconfigdata_*.py usr/lib/python${MAJOR_MINOR}
# Remove any absolute include-/library-paths and make the
# data relocatable...
sed -i -E \
-e '1i prefix = "/".join(__file__.split("/")[:-3])' \
-e "s|-[LI]/[^ ']*||g" \
-e "/DESTDIRS/b" \
-e "/INCLDIRSTOMAKE/b" \
-e "/TZPATH/b" \
-e "s|'/usr|prefix + '|" \
usr/lib/python${MAJOR_MINOR}/_sysconfigdata_*.py
python3 -m compileall usr/lib/python${MAJOR_MINOR}
provideDeps: [ "*-dev" ]
tgt:
packageScript: |
autotoolsPackageTgt
ln -sf python3 usr/bin/python
provideDeps: [ "*-tgt" ]
minimal:
depends:
- libs::expat-dev
- libs::libffi-dev
- libs::zlib-dev
buildScript: |
autotoolsBuild ../src \
--disable-bzip2 \
--disable-codecs-cjk \
--disable-curses \
--disable-idle3 \
--disable-lib2to3 \
--disable-nis \
--disable-openssl \
--disable-ossaudiodev \
--disable-pyc-build \
--disable-pydoc \
--disable-readline \
--disable-sqlite3 \
--disable-test-modules \
--disable-tk \
--disable-uuid \
--disable-xz \
--enable-unicodedata \
--enable-zlib \
--with-expat=system \
--with-libmpdec=none \
--with-system-ffi \
--without-cxx-main \
--without-ensurepip
packageScript: |
autotoolsPackageTgt
provideTools:
python3: usr/bin