@@ -25,23 +25,6 @@ declare -A gpgKeys=(
25
25
# https://www.python.org/dev/peps/pep-0664/#release-manager-and-crew
26
26
)
27
27
28
- # https://github.com/docker-library/python/issues/365
29
- # https://pypi.org/project/pip/#history
30
- declare -A pipVersions=(
31
- [3.11]=' 21.2' # https://github.com/python/cpython/blob/v3.11.0a1/Lib/ensurepip/__init__.py -- "_PIP_VERSION"
32
- [3.10]=' 21.2' # https://github.com/python/cpython/blob/3.10/Lib/ensurepip/__init__.py -- "_PIP_VERSION"
33
- [3.9]=' 21.2' # https://github.com/python/cpython/blob/3.9/Lib/ensurepip/__init__.py -- "_PIP_VERSION"
34
- [3.8]=' 21.2' # historical
35
- [3.7]=' 21.2' # historical
36
- )
37
- # https://pypi.org/project/setuptools/#history
38
- declare -A setuptoolsVersions=(
39
- [3.11]=' 57' # https://github.com/python/cpython/blob/v3.11.0a1/Lib/ensurepip/__init__.py -- "_SETUPTOOLS_VERSION"
40
- [3.10]=' 57' # https://github.com/python/cpython/blob/3.10/Lib/ensurepip/__init__.py -- "_SETUPTOOLS_VERSION"
41
- [3.9]=' 57' # https://github.com/python/cpython/blob/3.9/Lib/ensurepip/__init__.py -- "_SETUPTOOLS_VERSION"
42
- [3.8]=' 57' # historical
43
- [3.7]=' 57' # historical
44
- )
45
28
# https://pypi.org/project/wheel/#history
46
29
# TODO wheelVersions: https://github.com/docker-library/python/issues/365#issuecomment-914669320
47
30
@@ -151,30 +134,8 @@ for version in "${versions[@]}"; do
151
134
exit 1
152
135
fi
153
136
154
- pipVersion=" ${pipVersions[$rcVersion]} "
155
- pipVersion=" $(
156
- export pipVersion
157
- jq <<< " $pipJson" -r '
158
- .releases
159
- | [
160
- keys_unsorted[]
161
- | select(. == env.pipVersion or startswith(env.pipVersion + "."))
162
- ]
163
- | max_by(split(".") | map(tonumber))
164
- '
165
- ) "
166
- setuptoolsVersion=" ${setuptoolsVersions[$rcVersion]} "
167
- setuptoolsVersion=" $(
168
- export setuptoolsVersion
169
- jq <<< " $setuptoolsJson" -r '
170
- .releases
171
- | [
172
- keys_unsorted[]
173
- | select(. == env.setuptoolsVersion or startswith(env.setuptoolsVersion + "."))
174
- ]
175
- | max_by(split(".") | map(tonumber))
176
- '
177
- ) "
137
+ pipVersion=$( curl -s " https://raw.githubusercontent.com/python/cpython/v$fullVersion /Lib/ensurepip/__init__.py" | sed -n -r ' s/^_PIP_VERSION = "(.*?)"/\1/p' )
138
+ setuptoolsVersion=$( curl -s " https://raw.githubusercontent.com/python/cpython/v$fullVersion /Lib/ensurepip/__init__.py" | sed -n -r ' s/^_SETUPTOOLS_VERSION = "(.*?)"/\1/p' )
178
139
179
140
echo " $version : $fullVersion (pip $pipVersion , setuptools $setuptoolsVersion )"
180
141
0 commit comments