File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%%
1616
1717# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
1818ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
19+ ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
20+ ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
1921
2022RUN set -ex \
2123 && apk add --no-cache --virtual .fetch-deps \
@@ -71,7 +73,10 @@ RUN set -ex \
7173# 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
7274# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
7375# 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" \
7580 \
7681 && find /usr/local -depth \
7782 \( \
Original file line number Diff line number Diff line change @@ -18,6 +18,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%%
1818
1919# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
2020ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
21+ ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
22+ ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
2123
2224RUN set -ex \
2325 && buildDeps=' \
@@ -53,7 +55,10 @@ RUN set -ex \
5355# 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
5456# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
5557# 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" \
5762 \
5863 && find /usr/local -depth \
5964 \( \
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ ENV PYTHON_VERSION %%PLACEHOLDER%%
2020
2121# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
2222ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
23+ ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
24+ ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
2325
2426RUN set -ex \
2527 && buildDeps=' \
@@ -68,7 +70,10 @@ RUN set -ex \
6870# 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
6971# ("Requirement already up-to-date: pip==8.1.2 in /usr/local/lib/python3.6/site-packages")
7072# 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" \
7277 \
7378 && find /usr/local -depth \
7479 \( \
Original file line number Diff line number Diff line change @@ -32,7 +32,9 @@ if [ ${#versions[@]} -eq 0 ]; then
3232fi
3333versions=( " ${versions[@]%/ } " )
3434
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) "
3638
3739generated_warning () {
3840 cat << -EOH
@@ -103,6 +105,8 @@ for version in "${versions[@]}"; do
103105 -e ' s/^(ENV PYTHON_VERSION) .*/\1 ' " $fullVersion " ' /' \
104106 -e ' s/^(ENV PYTHON_RELEASE) .*/\1 ' " ${fullVersion%% [a-z]* } " ' /' \
105107 -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 " ' /' \
106110 -e ' s/^(FROM python):.*/\1:' " $version " ' /' \
107111 " $version " /{,* /,* /* /}Dockerfile
108112 )
You can’t perform that action at this time.
0 commit comments