Skip to content

Commit 9285fd8

Browse files
committed
Do not set PROFILE_TASK environment variable
When this is set, the `--enable-optimizations` option becomes ineffective, as the profile task step is bypassed. For 3.13, have to edit the Makefile to revert the original behavior because xml tests fail on older distros because of expat issues. closes #979
1 parent 7666104 commit 9285fd8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

Dockerfile-linux.template

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
def is_slim:
66
env.variant | startswith("slim-")
77
;
8+
def is_bullseye:
9+
env.variant | contains("bullseye")
10+
;
811
def rcVersion:
912
env.version | rtrimstr("-rc")
1013
-}}
@@ -185,19 +188,24 @@ RUN set -eux; \
185188
{{ ) end -}}
186189
{{ if is_slim or is_alpine then ( -}}
187190
LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \
191+
{{ ) else "" end -}}
192+
{{ if ([ "3.13" ] | index(rcVersion)) and (is_alpine or is_bullseye) then ( -}}
193+
# Workaround https://github.com/python/cpython/issues/125067
194+
sed -i -E \
195+
-e 's:(\$\(LLVM_PROF_FILE\) \$\(RUNSHARED\) ./\$\(BUILDPYTHON\) \$\(PROFILE_TASK\)):\1 || true:' \
196+
-e 's:TESTTIMEOUT=$:TESTTIMEOUT= 1200:' Makefile \
197+
; \
188198
{{ ) else "" end -}}
189199
make -j "$nproc" \
190200
"EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \
191201
"LDFLAGS=${LDFLAGS:-}" \
192-
"PROFILE_TASK=${PROFILE_TASK:-}" \
193202
; \
194203
# https://github.com/docker-library/python/issues/784
195204
# prevent accidental usage of a system installed libpython of the same version
196205
rm python; \
197206
make -j "$nproc" \
198207
"EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \
199208
"LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \
200-
"PROFILE_TASK=${PROFILE_TASK:-}" \
201209
python \
202210
; \
203211
make install; \

0 commit comments

Comments
 (0)