Skip to content

Remove explicit PROFILE_TASK for 3.8+ #411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3.5/alpine3.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.5/alpine3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.5/buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.5/buster/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.5/stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.5/stretch/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.6/alpine3.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.6/alpine3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.6/buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.6/buster/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.6/stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.6/stretch/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.7/alpine3.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.7/alpine3.9/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.7/buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.7/buster/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.7/stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion 3.7/stretch/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
36 changes: 0 additions & 36 deletions 3.8-rc/alpine3.10/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,42 +79,6 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
test_binascii \
test_binhex \
test_binop \
test_bytes \
test_c_locale_coercion \
test_class \
test_cmath \
test_codecs \
test_compile \
test_complex \
test_csv \
test_decimal \
test_dict \
test_float \
test_fstring \
test_hashlib \
test_io \
test_iter \
test_json \
test_long \
test_math \
test_memoryview \
test_pickle \
test_re \
test_set \
test_slice \
test_struct \
test_threading \
test_time \
test_traceback \
test_unicode \
' \
&& make install \
\
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \
Expand Down
36 changes: 0 additions & 36 deletions 3.8-rc/buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,42 +46,6 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
test_binascii \
test_binhex \
test_binop \
test_bytes \
test_c_locale_coercion \
test_class \
test_cmath \
test_codecs \
test_compile \
test_complex \
test_csv \
test_decimal \
test_dict \
test_float \
test_fstring \
test_hashlib \
test_io \
test_iter \
test_json \
test_long \
test_math \
test_memoryview \
test_pickle \
test_re \
test_set \
test_slice \
test_struct \
test_threading \
test_time \
test_traceback \
test_unicode \
' \
&& make install \
&& ldconfig \
\
Expand Down
36 changes: 0 additions & 36 deletions 3.8-rc/buster/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,42 +69,6 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
test_binascii \
test_binhex \
test_binop \
test_bytes \
test_c_locale_coercion \
test_class \
test_cmath \
test_codecs \
test_compile \
test_complex \
test_csv \
test_decimal \
test_dict \
test_float \
test_fstring \
test_hashlib \
test_io \
test_iter \
test_json \
test_long \
test_math \
test_memoryview \
test_pickle \
test_re \
test_set \
test_slice \
test_struct \
test_threading \
test_time \
test_traceback \
test_unicode \
' \
&& make install \
&& ldconfig \
\
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-alpine.template
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ RUN set -ex \
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-debian.template
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-slim.template
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ RUN set -ex \
--with-system-ffi \
--without-ensurepip \
&& make -j "$(nproc)" \
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916
PROFILE_TASK='-m test.regrtest --pgo \
test_array \
test_base64 \
Expand Down
19 changes: 15 additions & 4 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,20 @@ for version in "${versions[@]}"; do
-e 's!^(FROM (debian|buildpack-deps|alpine|mcr[.]microsoft[.]com/[^:]+)):.*!\1:'"$tag"'!' \
"$dir/Dockerfile"

case "$version/$v" in
case "$rcVersion/$v" in
# Libraries to build the nis module only available in Alpine 3.7+.
# Also require this patch https://bugs.python.org/issue32521 only available in Python 2.7, 3.6+.
3.5*/alpine*)
3.5/alpine*)
sed -ri -e '/libnsl-dev/d' -e '/libtirpc-dev/d' "$dir/Dockerfile"
;;& # (3.5*/alpine* needs to match the next blocks too)

# https://bugs.python.org/issue11063, https://bugs.python.org/issue20519 (Python 3.7.0+)
# A new native _uuid module improves uuid import time and avoids using ctypes.
# This requires the development libuuid headers.
3.[5-6]*/alpine*)
3.[5-6]/alpine*)
sed -ri -e '/util-linux-dev/d' "$dir/Dockerfile"
;;
3.[5-6]*)
3.[5-6]/*)
sed -ri -e '/uuid-dev/d' "$dir/Dockerfile"
;;& # (other Debian variants need to match later blocks)
*/buster | */stretch)
Expand All @@ -175,6 +175,17 @@ for version in "${versions[@]}"; do
;;
esac

major="${rcVersion%%.*}"
minor="${rcVersion#$major.}"
minor="${minor%%.*}"
if [ "$major" -gt 3 ] || { [ "$major" -eq 3 ] && [ "$minor" -ge 8 ]; }; then
# PROFILE_TASK has a reasonable default starting in 3.8+; see:
# https://bugs.python.org/issue36044
# https://github.com/python/cpython/pull/14702
# https://github.com/python/cpython/pull/14910
perl -0 -i -p -e "s![^\n]+PROFILE_TASK(='[^']+?')?[^\n]+\n!!gs" "$dir/Dockerfile"
fi

case "$v" in
windows/*-1803)
travisEnv='\n - os: windows\n dist: 1803-containers\n env: VERSION='"$version VARIANT=$v$travisEnv"
Expand Down