Skip to content

Commit a10d405

Browse files
authored
Merge pull request #61 from infosiftr/pin-setuptools
Pin setuptools to 44.x
2 parents c82a643 + bfdb2ba commit a10d405

File tree

14 files changed

+61
-10
lines changed

14 files changed

+61
-10
lines changed

2.7/bullseye/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

2.7/buster/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

2.7/slim-bullseye/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

2.7/slim-buster/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

2.7/windows/windowsservercore-1809/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.7/bullseye/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.7/buster/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.7/slim-bullseye/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.7/slim-buster/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.7/windows/windowsservercore-1809/Dockerfile

+3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-linux.template

+3
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ RUN set -eux; \
132132

133133
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
134134
ENV PYTHON_PIP_VERSION {{ .pip.version }}
135+
# https://github.com/docker-library/python/issues/365
136+
ENV PYTHON_SETUPTOOLS_VERSION {{ .setuptools.version }}
135137
# https://github.com/pypa/get-pip
136138
ENV PYTHON_GET_PIP_URL {{ ."get-pip".url }}
137139
ENV PYTHON_GET_PIP_SHA256 {{ ."get-pip".sha256 }}
@@ -150,6 +152,7 @@ RUN set -ex; \
150152
--disable-pip-version-check \
151153
--no-cache-dir \
152154
"pip == $PYTHON_PIP_VERSION" \
155+
"setuptools == $PYTHON_SETUPTOOLS_VERSION" \
153156
; \
154157
{{ if is_slim then ( -}}
155158
apt-get purge -y --auto-remove wget; \

Dockerfile-windows-servercore.template

+3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ RUN $url = '{{ .arches["windows-amd64"].url }}'; \
8888

8989
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
9090
ENV PYTHON_PIP_VERSION {{ .pip.version }}
91+
# https://github.com/docker-library/python/issues/365
92+
ENV PYTHON_SETUPTOOLS_VERSION {{ .setuptools.version }}
9193
# https://github.com/pypa/get-pip
9294
ENV PYTHON_GET_PIP_URL {{ ."get-pip".url }}
9395
ENV PYTHON_GET_PIP_SHA256 {{ ."get-pip".sha256 }}
@@ -106,6 +108,7 @@ RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL);
106108
--disable-pip-version-check \
107109
--no-cache-dir \
108110
('pip == {0}' -f $env:PYTHON_PIP_VERSION) \
111+
('setuptools == {0}' -f $env:PYTHON_SETUPTOOLS_VERSION) \
109112
; \
110113
Remove-Item get-pip.py -Force; \
111114
\

versions.json

+6
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"pip": {
2727
"version": "20.3.4"
2828
},
29+
"setuptools": {
30+
"version": "44.1.1"
31+
},
2932
"variants": [
3033
"bullseye",
3134
"slim-bullseye",
@@ -66,6 +69,9 @@
6669
"pip": {
6770
"version": "20.3.4"
6871
},
72+
"setuptools": {
73+
"version": "44.1.1"
74+
},
6975
"variants": [
7076
"bullseye",
7177
"slim-bullseye",

versions.sh

+19-10
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,28 @@ fi
2727
versions=( "${versions[@]%/}" )
2828

2929
pipVersion="$(
30-
curl -fsSL 'https://pypi.org/pypi/pip/json' \
31-
| jq -r '
32-
.releases
33-
| keys[]
34-
# version 20.x is the last to support Python 2
35-
| select(startswith("20."))
36-
' \
37-
| sort -rV \
38-
| head -1
30+
curl -fsSL 'https://pypi.org/pypi/pip/json' | jq -r '
31+
.releases
32+
| keys_unsorted
33+
# version 20.x is the last to support Python 2
34+
| map(select(startswith("20.") and (test("[^0-9.]") | not)))
35+
| max_by(split(".") | map(tonumber))
36+
'
37+
)"
38+
# https://github.com/docker-library/python/issues/365
39+
setuptoolsVersion="$(
40+
curl -fsSL 'https://pypi.org/pypi/setuptools/json' | jq -r '
41+
.releases
42+
| keys_unsorted
43+
# version 44.x is the last to support Python 2
44+
| map(select(startswith("44.")))
45+
| max_by(split(".") | map(tonumber))
46+
'
3947
)"
4048
getPipCommit="$(curl -fsSL "https://github.com/pypa/get-pip/commits/$pipVersion/get-pip.py.atom" | tac|tac | awk -F '[[:space:]]*[<>/]+' '$2 == "id" && $3 ~ /Commit/ { print $4; exit }')"
4149
getPipUrl="https://github.com/pypa/get-pip/raw/$getPipCommit/get-pip.py"
4250
getPipSha256="$(curl -fsSL "$getPipUrl" | sha256sum | cut -d' ' -f1)"
43-
export pipVersion getPipCommit getPipUrl getPipSha256
51+
export pipVersion setuptoolsVersion getPipCommit getPipUrl getPipSha256
4452

4553
sha256s="$(curl -fsSL --compressed 'https://www.pypy.org/checksums.html')"
4654
pypy_tarball() {
@@ -106,6 +114,7 @@ for version in "${versions[@]}"; do
106114
},
107115
},
108116
pip: { version: env.pipVersion },
117+
setuptools: { version: env.setuptoolsVersion },
109118
"get-pip": {
110119
version: env.getPipCommit,
111120
sha256: env.getPipSha256,

0 commit comments

Comments
 (0)