File tree Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Expand file tree Collapse file tree 4 files changed +23
-4
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%%
16
16
17
17
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
18
18
ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
19
+ ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
20
+ ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
19
21
20
22
RUN set -ex \
21
23
&& apk add --no-cache --virtual .fetch-deps \
@@ -71,7 +73,10 @@ RUN set -ex \
71
73
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
72
74
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
73
75
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
74
- && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
76
+ && pip3 install --no-cache-dir --upgrade --force-reinstall \
77
+ "pip==$PYTHON_PIP_VERSION" \
78
+ "setuptools==$PYTHON_SETUPTOOLS_VERSION" \
79
+ "wheel==$PYTHON_WHEEL_VERSION" \
75
80
\
76
81
&& find /usr/local -depth \
77
82
\( \
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%%
18
18
19
19
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
20
20
ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
21
+ ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
22
+ ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
21
23
22
24
RUN set -ex \
23
25
&& buildDeps=' \
@@ -53,7 +55,10 @@ RUN set -ex \
53
55
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
54
56
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
55
57
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
56
- && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
58
+ && pip3 install --no-cache-dir --upgrade --force-reinstall \
59
+ "pip==$PYTHON_PIP_VERSION" \
60
+ "setuptools==$PYTHON_SETUPTOOLS_VERSION" \
61
+ "wheel==$PYTHON_WHEEL_VERSION" \
57
62
\
58
63
&& find /usr/local -depth \
59
64
\( \
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%%
20
20
21
21
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
22
22
ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
23
+ ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
24
+ ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
23
25
24
26
RUN set -ex \
25
27
&& buildDeps=' \
@@ -68,7 +70,10 @@ RUN set -ex \
68
70
# we use "--force-reinstall" for the case where the version of pip we're trying to install is the same as the version bundled with Python
69
71
# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
70
72
# https://github.com/docker-library/python/pull/143#issuecomment-241032683
71
- && pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
73
+ && pip3 install --no-cache-dir --upgrade --force-reinstall \
74
+ "pip==$PYTHON_PIP_VERSION" \
75
+ "setuptools==$PYTHON_SETUPTOOLS_VERSION" \
76
+ "wheel==$PYTHON_WHEEL_VERSION" \
72
77
\
73
78
&& find /usr/local -depth \
74
79
\( \
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ if [ ${#versions[@]} -eq 0 ]; then
32
32
fi
33
33
versions=( " ${versions[@]%/ } " )
34
34
35
- pipVersion=" $( curl -fsSL ' https://pypi.python.org/pypi/pip/json' | awk -F ' "' ' $2 == "version" { print $4 }' ) "
35
+ pipVersion=" $( curl -fsSL ' https://pypi.org/pypi/pip/json' | jq -r .info.version) "
36
+ setuptoolsVersion=" $( curl -fsSL ' https://pypi.org/pypi/setuptools/json' | jq -r .info.version) "
37
+ wheelVersion=" $( curl -fsSL ' https://pypi.org/pypi/wheel/json' | jq -r .info.version) "
36
38
37
39
generated_warning () {
38
40
cat << -EOH
@@ -103,6 +105,8 @@ for version in "${versions[@]}"; do
103
105
-e ' s/^(ENV PYTHON_VERSION) .*/\1 ' " $fullVersion " ' /' \
104
106
-e ' s/^(ENV PYTHON_RELEASE) .*/\1 ' " ${fullVersion%% [a-z]* } " ' /' \
105
107
-e ' s/^(ENV PYTHON_PIP_VERSION) .*/\1 ' " $pipVersion " ' /' \
108
+ -e ' s/^(ENV PYTHON_SETUPTOOLS_VERSION) .*/\1 ' " $setuptoolsVersion " ' /' \
109
+ -e ' s/^(ENV PYTHON_WHEEL_VERSION) .*/\1 ' " $wheelVersion " ' /' \
106
110
-e ' s/^(FROM python):.*/\1:' " $version " ' /' \
107
111
" $version " /{,* /,* /* /}Dockerfile
108
112
)
You can’t perform that action at this time.
0 commit comments