Skip to content

Pin setuptools to 44.x #61

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 2.7/bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 2.7/buster/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 2.7/slim-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 2.7/slim-buster/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 2.7/windows/windowsservercore-1809/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 3.7/bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 3.7/buster/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 3.7/slim-bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 3.7/slim-buster/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions 3.7/windows/windowsservercore-1809/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ RUN set -eux; \

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION {{ .pip.version }}
# https://github.com/docker-library/python/issues/365
ENV PYTHON_SETUPTOOLS_VERSION {{ .setuptools.version }}
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL {{ ."get-pip".url }}
ENV PYTHON_GET_PIP_SHA256 {{ ."get-pip".sha256 }}
Expand All @@ -150,6 +152,7 @@ RUN set -ex; \
--disable-pip-version-check \
--no-cache-dir \
"pip == $PYTHON_PIP_VERSION" \
"setuptools == $PYTHON_SETUPTOOLS_VERSION" \
; \
{{ if is_slim then ( -}}
apt-get purge -y --auto-remove wget; \
Expand Down
3 changes: 3 additions & 0 deletions Dockerfile-windows-servercore.template
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ RUN $url = '{{ .arches["windows-amd64"].url }}'; \

# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION {{ .pip.version }}
# https://github.com/docker-library/python/issues/365
ENV PYTHON_SETUPTOOLS_VERSION {{ .setuptools.version }}
# https://github.com/pypa/get-pip
ENV PYTHON_GET_PIP_URL {{ ."get-pip".url }}
ENV PYTHON_GET_PIP_SHA256 {{ ."get-pip".sha256 }}
Expand All @@ -106,6 +108,7 @@ RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL);
--disable-pip-version-check \
--no-cache-dir \
('pip == {0}' -f $env:PYTHON_PIP_VERSION) \
('setuptools == {0}' -f $env:PYTHON_SETUPTOOLS_VERSION) \
; \
Remove-Item get-pip.py -Force; \
\
Expand Down
6 changes: 6 additions & 0 deletions versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@
"pip": {
"version": "20.3.4"
},
"setuptools": {
"version": "44.1.1"
},
"variants": [
"bullseye",
"slim-bullseye",
Expand Down Expand Up @@ -66,6 +69,9 @@
"pip": {
"version": "20.3.4"
},
"setuptools": {
"version": "44.1.1"
},
"variants": [
"bullseye",
"slim-bullseye",
Expand Down
29 changes: 19 additions & 10 deletions versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,28 @@ fi
versions=( "${versions[@]%/}" )

pipVersion="$(
curl -fsSL 'https://pypi.org/pypi/pip/json' \
| jq -r '
.releases
| keys[]
# version 20.x is the last to support Python 2
| select(startswith("20."))
' \
| sort -rV \
| head -1
curl -fsSL 'https://pypi.org/pypi/pip/json' | jq -r '
.releases
| keys_unsorted
# version 20.x is the last to support Python 2
| map(select(startswith("20.") and (test("[^0-9.]") | not)))
| max_by(split(".") | map(tonumber))
'
)"
# https://github.com/docker-library/python/issues/365
setuptoolsVersion="$(
curl -fsSL 'https://pypi.org/pypi/setuptools/json' | jq -r '
.releases
| keys_unsorted
# version 44.x is the last to support Python 2
| map(select(startswith("44.")))
| max_by(split(".") | map(tonumber))
'
)"
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 }')"
getPipUrl="https://github.com/pypa/get-pip/raw/$getPipCommit/get-pip.py"
getPipSha256="$(curl -fsSL "$getPipUrl" | sha256sum | cut -d' ' -f1)"
export pipVersion getPipCommit getPipUrl getPipSha256
export pipVersion setuptoolsVersion getPipCommit getPipUrl getPipSha256

sha256s="$(curl -fsSL --compressed 'https://www.pypy.org/checksums.html')"
pypy_tarball() {
Expand Down Expand Up @@ -106,6 +114,7 @@ for version in "${versions[@]}"; do
},
},
pip: { version: env.pipVersion },
setuptools: { version: env.setuptoolsVersion },
"get-pip": {
version: env.getPipCommit,
sha256: env.getPipSha256,
Expand Down