Skip to content

Commit 2c24d12

Browse files
maltianon
authored andcommitted
Explicitly version setuptools and wheel
1 parent 089f8ce commit 2c24d12

File tree

4 files changed

+23
-4
lines changed

4 files changed

+23
-4
lines changed

Dockerfile-alpine.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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>'"
1818
ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
19+
ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
20+
ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
1921

2022
RUN 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
\( \

Dockerfile-debian.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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>'"
2020
ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
21+
ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
22+
ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
2123

2224
RUN 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
\( \

Dockerfile-slim.template

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff 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>'"
2222
ENV PYTHON_PIP_VERSION %%PLACEHOLDER%%
23+
ENV PYTHON_SETUPTOOLS_VERSION %%PLACEHOLDER%%
24+
ENV PYTHON_WHEEL_VERSION %%PLACEHOLDER%%
2325

2426
RUN 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
\( \

update.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ if [ ${#versions[@]} -eq 0 ]; then
3232
fi
3333
versions=( "${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

3739
generated_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
)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy