Skip to content

Commit a12a97a

Browse files
authored
Merge pull request #404 from infosiftr/enable-optimizations
Add "--enable-optimizations" (and a slimmer PROFILE_TASK than the default of "run all tests")
2 parents ccbc1f5 + f82205c commit a12a97a

File tree

22 files changed

+814
-0
lines changed

22 files changed

+814
-0
lines changed

3.5/alpine3.10/Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ RUN set -ex \
6767
&& ./configure \
6868
--build="$gnuArch" \
6969
--enable-loadable-sqlite-extensions \
70+
--enable-optimizations \
7071
--enable-shared \
7172
--with-system-expat \
7273
--with-system-ffi \
@@ -75,6 +76,42 @@ RUN set -ex \
7576
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
7677
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
7778
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
79+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
80+
PROFILE_TASK='-m test.regrtest --pgo \
81+
test_array \
82+
test_base64 \
83+
test_binascii \
84+
test_binhex \
85+
test_binop \
86+
test_bytes \
87+
test_c_locale_coercion \
88+
test_class \
89+
test_cmath \
90+
test_codecs \
91+
test_compile \
92+
test_complex \
93+
test_csv \
94+
test_decimal \
95+
test_dict \
96+
test_float \
97+
test_fstring \
98+
test_hashlib \
99+
test_io \
100+
test_iter \
101+
test_json \
102+
test_long \
103+
test_math \
104+
test_memoryview \
105+
test_pickle \
106+
test_re \
107+
test_set \
108+
test_slice \
109+
test_struct \
110+
test_threading \
111+
test_time \
112+
test_traceback \
113+
test_unicode \
114+
' \
78115
&& make install \
79116
\
80117
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \

3.5/alpine3.9/Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ RUN set -ex \
6767
&& ./configure \
6868
--build="$gnuArch" \
6969
--enable-loadable-sqlite-extensions \
70+
--enable-optimizations \
7071
--enable-shared \
7172
--with-system-expat \
7273
--with-system-ffi \
@@ -75,6 +76,42 @@ RUN set -ex \
7576
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
7677
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
7778
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
79+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
80+
PROFILE_TASK='-m test.regrtest --pgo \
81+
test_array \
82+
test_base64 \
83+
test_binascii \
84+
test_binhex \
85+
test_binop \
86+
test_bytes \
87+
test_c_locale_coercion \
88+
test_class \
89+
test_cmath \
90+
test_codecs \
91+
test_compile \
92+
test_complex \
93+
test_csv \
94+
test_decimal \
95+
test_dict \
96+
test_float \
97+
test_fstring \
98+
test_hashlib \
99+
test_io \
100+
test_iter \
101+
test_json \
102+
test_long \
103+
test_math \
104+
test_memoryview \
105+
test_pickle \
106+
test_re \
107+
test_set \
108+
test_slice \
109+
test_struct \
110+
test_threading \
111+
test_time \
112+
test_traceback \
113+
test_unicode \
114+
' \
78115
&& make install \
79116
\
80117
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \

3.5/jessie/Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,48 @@ RUN set -ex \
3939
&& ./configure \
4040
--build="$gnuArch" \
4141
--enable-loadable-sqlite-extensions \
42+
--enable-optimizations \
4243
--enable-shared \
4344
--with-system-expat \
4445
--with-system-ffi \
4546
--without-ensurepip \
4647
&& make -j "$(nproc)" \
48+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
49+
PROFILE_TASK='-m test.regrtest --pgo \
50+
test_array \
51+
test_base64 \
52+
test_binascii \
53+
test_binhex \
54+
test_binop \
55+
test_bytes \
56+
test_c_locale_coercion \
57+
test_class \
58+
test_cmath \
59+
test_codecs \
60+
test_compile \
61+
test_complex \
62+
test_csv \
63+
test_decimal \
64+
test_dict \
65+
test_float \
66+
test_fstring \
67+
test_hashlib \
68+
test_io \
69+
test_iter \
70+
test_json \
71+
test_long \
72+
test_math \
73+
test_memoryview \
74+
test_pickle \
75+
test_re \
76+
test_set \
77+
test_slice \
78+
test_struct \
79+
test_threading \
80+
test_time \
81+
test_traceback \
82+
test_unicode \
83+
' \
4784
&& make install \
4885
&& ldconfig \
4986
\

3.5/jessie/slim/Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,48 @@ RUN set -ex \
6262
&& ./configure \
6363
--build="$gnuArch" \
6464
--enable-loadable-sqlite-extensions \
65+
--enable-optimizations \
6566
--enable-shared \
6667
--with-system-expat \
6768
--with-system-ffi \
6869
--without-ensurepip \
6970
&& make -j "$(nproc)" \
71+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
72+
PROFILE_TASK='-m test.regrtest --pgo \
73+
test_array \
74+
test_base64 \
75+
test_binascii \
76+
test_binhex \
77+
test_binop \
78+
test_bytes \
79+
test_c_locale_coercion \
80+
test_class \
81+
test_cmath \
82+
test_codecs \
83+
test_compile \
84+
test_complex \
85+
test_csv \
86+
test_decimal \
87+
test_dict \
88+
test_float \
89+
test_fstring \
90+
test_hashlib \
91+
test_io \
92+
test_iter \
93+
test_json \
94+
test_long \
95+
test_math \
96+
test_memoryview \
97+
test_pickle \
98+
test_re \
99+
test_set \
100+
test_slice \
101+
test_struct \
102+
test_threading \
103+
test_time \
104+
test_traceback \
105+
test_unicode \
106+
' \
70107
&& make install \
71108
&& ldconfig \
72109
\

3.5/stretch/Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,48 @@ RUN set -ex \
3939
&& ./configure \
4040
--build="$gnuArch" \
4141
--enable-loadable-sqlite-extensions \
42+
--enable-optimizations \
4243
--enable-shared \
4344
--with-system-expat \
4445
--with-system-ffi \
4546
--without-ensurepip \
4647
&& make -j "$(nproc)" \
48+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
49+
PROFILE_TASK='-m test.regrtest --pgo \
50+
test_array \
51+
test_base64 \
52+
test_binascii \
53+
test_binhex \
54+
test_binop \
55+
test_bytes \
56+
test_c_locale_coercion \
57+
test_class \
58+
test_cmath \
59+
test_codecs \
60+
test_compile \
61+
test_complex \
62+
test_csv \
63+
test_decimal \
64+
test_dict \
65+
test_float \
66+
test_fstring \
67+
test_hashlib \
68+
test_io \
69+
test_iter \
70+
test_json \
71+
test_long \
72+
test_math \
73+
test_memoryview \
74+
test_pickle \
75+
test_re \
76+
test_set \
77+
test_slice \
78+
test_struct \
79+
test_threading \
80+
test_time \
81+
test_traceback \
82+
test_unicode \
83+
' \
4784
&& make install \
4885
&& ldconfig \
4986
\

3.5/stretch/slim/Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,48 @@ RUN set -ex \
6262
&& ./configure \
6363
--build="$gnuArch" \
6464
--enable-loadable-sqlite-extensions \
65+
--enable-optimizations \
6566
--enable-shared \
6667
--with-system-expat \
6768
--with-system-ffi \
6869
--without-ensurepip \
6970
&& make -j "$(nproc)" \
71+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
72+
PROFILE_TASK='-m test.regrtest --pgo \
73+
test_array \
74+
test_base64 \
75+
test_binascii \
76+
test_binhex \
77+
test_binop \
78+
test_bytes \
79+
test_c_locale_coercion \
80+
test_class \
81+
test_cmath \
82+
test_codecs \
83+
test_compile \
84+
test_complex \
85+
test_csv \
86+
test_decimal \
87+
test_dict \
88+
test_float \
89+
test_fstring \
90+
test_hashlib \
91+
test_io \
92+
test_iter \
93+
test_json \
94+
test_long \
95+
test_math \
96+
test_memoryview \
97+
test_pickle \
98+
test_re \
99+
test_set \
100+
test_slice \
101+
test_struct \
102+
test_threading \
103+
test_time \
104+
test_traceback \
105+
test_unicode \
106+
' \
70107
&& make install \
71108
&& ldconfig \
72109
\

3.6/alpine3.10/Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ RUN set -ex \
6969
&& ./configure \
7070
--build="$gnuArch" \
7171
--enable-loadable-sqlite-extensions \
72+
--enable-optimizations \
7273
--enable-shared \
7374
--with-system-expat \
7475
--with-system-ffi \
@@ -77,6 +78,42 @@ RUN set -ex \
7778
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
7879
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
7980
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
81+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
82+
PROFILE_TASK='-m test.regrtest --pgo \
83+
test_array \
84+
test_base64 \
85+
test_binascii \
86+
test_binhex \
87+
test_binop \
88+
test_bytes \
89+
test_c_locale_coercion \
90+
test_class \
91+
test_cmath \
92+
test_codecs \
93+
test_compile \
94+
test_complex \
95+
test_csv \
96+
test_decimal \
97+
test_dict \
98+
test_float \
99+
test_fstring \
100+
test_hashlib \
101+
test_io \
102+
test_iter \
103+
test_json \
104+
test_long \
105+
test_math \
106+
test_memoryview \
107+
test_pickle \
108+
test_re \
109+
test_set \
110+
test_slice \
111+
test_struct \
112+
test_threading \
113+
test_time \
114+
test_traceback \
115+
test_unicode \
116+
' \
80117
&& make install \
81118
\
82119
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \

3.6/alpine3.9/Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ RUN set -ex \
6969
&& ./configure \
7070
--build="$gnuArch" \
7171
--enable-loadable-sqlite-extensions \
72+
--enable-optimizations \
7273
--enable-shared \
7374
--with-system-expat \
7475
--with-system-ffi \
@@ -77,6 +78,42 @@ RUN set -ex \
7778
# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit()
7879
# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0
7980
EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000" \
81+
# https://github.com/docker-library/python/issues/160#issuecomment-509426916
82+
PROFILE_TASK='-m test.regrtest --pgo \
83+
test_array \
84+
test_base64 \
85+
test_binascii \
86+
test_binhex \
87+
test_binop \
88+
test_bytes \
89+
test_c_locale_coercion \
90+
test_class \
91+
test_cmath \
92+
test_codecs \
93+
test_compile \
94+
test_complex \
95+
test_csv \
96+
test_decimal \
97+
test_dict \
98+
test_float \
99+
test_fstring \
100+
test_hashlib \
101+
test_io \
102+
test_iter \
103+
test_json \
104+
test_long \
105+
test_math \
106+
test_memoryview \
107+
test_pickle \
108+
test_re \
109+
test_set \
110+
test_slice \
111+
test_struct \
112+
test_threading \
113+
test_time \
114+
test_traceback \
115+
test_unicode \
116+
' \
80117
&& make install \
81118
\
82119
&& find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \

0 commit comments

Comments
 (0)