diff --git a/3.10/alpine3.19/Dockerfile b/3.10/alpine3.19/Dockerfile index c872e7127..65a6b2d37 100644 --- a/3.10/alpine3.19/Dockerfile +++ b/3.10/alpine3.19/Dockerfile @@ -78,7 +78,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -119,43 +119,25 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.10/alpine3.20/Dockerfile b/3.10/alpine3.20/Dockerfile index 8aac69920..4627b12b5 100644 --- a/3.10/alpine3.20/Dockerfile +++ b/3.10/alpine3.20/Dockerfile @@ -78,7 +78,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -119,43 +119,25 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.10/bookworm/Dockerfile b/3.10/bookworm/Dockerfile index 43142bb10..9e9e3170a 100644 --- a/3.10/bookworm/Dockerfile +++ b/3.10/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -89,43 +89,25 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.10/bullseye/Dockerfile b/3.10/bullseye/Dockerfile index 019c67465..98440f9a5 100644 --- a/3.10/bullseye/Dockerfile +++ b/3.10/bullseye/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -89,43 +89,25 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.10/slim-bookworm/Dockerfile b/3.10/slim-bookworm/Dockerfile index b0368d6c1..e99add8ed 100644 --- a/3.10/slim-bookworm/Dockerfile +++ b/3.10/slim-bookworm/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -123,52 +123,25 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.10/slim-bullseye/Dockerfile b/3.10/slim-bullseye/Dockerfile index 80b38c701..0732224b2 100644 --- a/3.10/slim-bullseye/Dockerfile +++ b/3.10/slim-bullseye/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -123,52 +123,25 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.11/alpine3.19/Dockerfile b/3.11/alpine3.19/Dockerfile index 080c3dd9d..39491416a 100644 --- a/3.11/alpine3.19/Dockerfile +++ b/3.11/alpine3.19/Dockerfile @@ -78,7 +78,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -119,43 +119,25 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.0 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.11/alpine3.20/Dockerfile b/3.11/alpine3.20/Dockerfile index ec82561a2..a945539c2 100644 --- a/3.11/alpine3.20/Dockerfile +++ b/3.11/alpine3.20/Dockerfile @@ -78,7 +78,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -119,43 +119,25 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.0 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.11/bookworm/Dockerfile b/3.11/bookworm/Dockerfile index a1bcdc25e..93be03eb4 100644 --- a/3.11/bookworm/Dockerfile +++ b/3.11/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -89,43 +89,25 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.0 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.11/bullseye/Dockerfile b/3.11/bullseye/Dockerfile index 0dd17ac8d..c5a0a7a6d 100644 --- a/3.11/bullseye/Dockerfile +++ b/3.11/bullseye/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -89,43 +89,25 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.0 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.11/slim-bookworm/Dockerfile b/3.11/slim-bookworm/Dockerfile index 591c54d43..f435e9847 100644 --- a/3.11/slim-bookworm/Dockerfile +++ b/3.11/slim-bookworm/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -123,52 +123,25 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.0 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.11/slim-bullseye/Dockerfile b/3.11/slim-bullseye/Dockerfile index a4312a744..4a5fdd620 100644 --- a/3.11/slim-bullseye/Dockerfile +++ b/3.11/slim-bullseye/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -123,52 +123,25 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==65.5.1' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.0 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 65.5.1 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.12/alpine3.19/Dockerfile b/3.12/alpine3.19/Dockerfile index e2c480063..2b4b76262 100644 --- a/3.12/alpine3.19/Dockerfile +++ b/3.12/alpine3.19/Dockerfile @@ -78,7 +78,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -119,40 +119,17 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.12/alpine3.20/Dockerfile b/3.12/alpine3.20/Dockerfile index a34f2af1a..89d13a74b 100644 --- a/3.12/alpine3.20/Dockerfile +++ b/3.12/alpine3.20/Dockerfile @@ -78,7 +78,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -119,40 +119,17 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.12/bookworm/Dockerfile b/3.12/bookworm/Dockerfile index 890b797f2..2ff3e16b6 100644 --- a/3.12/bookworm/Dockerfile +++ b/3.12/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -89,40 +89,17 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.12/bullseye/Dockerfile b/3.12/bullseye/Dockerfile index df4ff9ecd..0d32ee6c9 100644 --- a/3.12/bullseye/Dockerfile +++ b/3.12/bullseye/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -89,40 +89,17 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.12/slim-bookworm/Dockerfile b/3.12/slim-bookworm/Dockerfile index b61f17968..d9a77a260 100644 --- a/3.12/slim-bookworm/Dockerfile +++ b/3.12/slim-bookworm/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -123,49 +123,17 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.12/slim-bullseye/Dockerfile b/3.12/slim-bullseye/Dockerfile index c1ff09710..ca3d6fd7f 100644 --- a/3.12/slim-bullseye/Dockerfile +++ b/3.12/slim-bullseye/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -123,49 +123,17 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.12/windows/windowsservercore-1809/Dockerfile b/3.12/windows/windowsservercore-1809/Dockerfile index 3d22175fc..d41dfd073 100644 --- a/3.12/windows/windowsservercore-1809/Dockerfile +++ b/3.12/windows/windowsservercore-1809/Dockerfile @@ -28,7 +28,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en 'PrependPath=1', \ 'Shortcuts=0', \ 'Include_doc=0', \ - 'Include_pip=0', \ + 'Include_pip=1', \ 'Include_test=0' \ ) \ ).ExitCode; \ @@ -48,36 +48,8 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ - Write-Host 'Complete.' - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \ - if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ - Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ - --no-setuptools \ - --no-wheel \ - ; \ - Remove-Item get-pip.py -Force; \ - \ Write-Host 'Verifying pip install ...'; \ pip --version; \ \ diff --git a/3.12/windows/windowsservercore-ltsc2022/Dockerfile b/3.12/windows/windowsservercore-ltsc2022/Dockerfile index 8c6897792..09a2a4e0a 100644 --- a/3.12/windows/windowsservercore-ltsc2022/Dockerfile +++ b/3.12/windows/windowsservercore-ltsc2022/Dockerfile @@ -28,7 +28,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en 'PrependPath=1', \ 'Shortcuts=0', \ 'Include_doc=0', \ - 'Include_pip=0', \ + 'Include_pip=1', \ 'Include_test=0' \ ) \ ).ExitCode; \ @@ -48,36 +48,8 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ - Write-Host 'Complete.' - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \ - if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ - Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ - --no-setuptools \ - --no-wheel \ - ; \ - Remove-Item get-pip.py -Force; \ - \ Write-Host 'Verifying pip install ...'; \ pip --version; \ \ diff --git a/3.13-rc/alpine3.19/Dockerfile b/3.13-rc/alpine3.19/Dockerfile index c719db6ea..194db7a26 100644 --- a/3.13-rc/alpine3.19/Dockerfile +++ b/3.13-rc/alpine3.19/Dockerfile @@ -73,7 +73,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -114,40 +114,17 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.13-rc/alpine3.20/Dockerfile b/3.13-rc/alpine3.20/Dockerfile index aa3e5eeeb..7832c83dd 100644 --- a/3.13-rc/alpine3.20/Dockerfile +++ b/3.13-rc/alpine3.20/Dockerfile @@ -73,7 +73,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -114,40 +114,17 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.13-rc/bookworm/Dockerfile b/3.13-rc/bookworm/Dockerfile index 33fc106d8..c352394a1 100644 --- a/3.13-rc/bookworm/Dockerfile +++ b/3.13-rc/bookworm/Dockerfile @@ -45,7 +45,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -84,40 +84,17 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.13-rc/bullseye/Dockerfile b/3.13-rc/bullseye/Dockerfile index 344cef578..dd469dc74 100644 --- a/3.13-rc/bullseye/Dockerfile +++ b/3.13-rc/bullseye/Dockerfile @@ -45,7 +45,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -84,40 +84,17 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.13-rc/slim-bookworm/Dockerfile b/3.13-rc/slim-bookworm/Dockerfile index 300a07448..e5e307491 100644 --- a/3.13-rc/slim-bookworm/Dockerfile +++ b/3.13-rc/slim-bookworm/Dockerfile @@ -71,7 +71,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -118,49 +118,17 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.13-rc/slim-bullseye/Dockerfile b/3.13-rc/slim-bullseye/Dockerfile index 23065ca98..741cd826b 100644 --- a/3.13-rc/slim-bullseye/Dockerfile +++ b/3.13-rc/slim-bullseye/Dockerfile @@ -71,7 +71,7 @@ RUN set -eux; \ --enable-shared \ --with-lto \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -118,49 +118,17 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - --no-setuptools \ - --no-wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.13-rc/windows/windowsservercore-1809/Dockerfile b/3.13-rc/windows/windowsservercore-1809/Dockerfile index a943bac0d..00ac9a02e 100644 --- a/3.13-rc/windows/windowsservercore-1809/Dockerfile +++ b/3.13-rc/windows/windowsservercore-1809/Dockerfile @@ -28,7 +28,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en 'PrependPath=1', \ 'Shortcuts=0', \ 'Include_doc=0', \ - 'Include_pip=0', \ + 'Include_pip=1', \ 'Include_test=0' \ ) \ ).ExitCode; \ @@ -48,36 +48,8 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ - Write-Host 'Complete.' - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \ - if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ - Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ - --no-setuptools \ - --no-wheel \ - ; \ - Remove-Item get-pip.py -Force; \ - \ Write-Host 'Verifying pip install ...'; \ pip --version; \ \ diff --git a/3.13-rc/windows/windowsservercore-ltsc2022/Dockerfile b/3.13-rc/windows/windowsservercore-ltsc2022/Dockerfile index 550c0eb34..a8e353350 100644 --- a/3.13-rc/windows/windowsservercore-ltsc2022/Dockerfile +++ b/3.13-rc/windows/windowsservercore-ltsc2022/Dockerfile @@ -28,7 +28,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en 'PrependPath=1', \ 'Shortcuts=0', \ 'Include_doc=0', \ - 'Include_pip=0', \ + 'Include_pip=1', \ 'Include_test=0' \ ) \ ).ExitCode; \ @@ -48,36 +48,8 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ - Write-Host 'Complete.' - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 24.2 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \ - if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ \ - Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ - --no-setuptools \ - --no-wheel \ - ; \ - Remove-Item get-pip.py -Force; \ - \ Write-Host 'Verifying pip install ...'; \ pip --version; \ \ diff --git a/3.8/alpine3.19/Dockerfile b/3.8/alpine3.19/Dockerfile index 63dc9879f..b7371cc75 100644 --- a/3.8/alpine3.19/Dockerfile +++ b/3.8/alpine3.19/Dockerfile @@ -77,7 +77,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -119,43 +119,25 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==57.5.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.8/alpine3.20/Dockerfile b/3.8/alpine3.20/Dockerfile index 688b63297..706192624 100644 --- a/3.8/alpine3.20/Dockerfile +++ b/3.8/alpine3.20/Dockerfile @@ -77,7 +77,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -119,43 +119,25 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==57.5.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.8/bookworm/Dockerfile b/3.8/bookworm/Dockerfile index 94e1a5287..3304a4921 100644 --- a/3.8/bookworm/Dockerfile +++ b/3.8/bookworm/Dockerfile @@ -49,7 +49,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -89,43 +89,25 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==57.5.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.8/bullseye/Dockerfile b/3.8/bullseye/Dockerfile index 7020cc251..7ac4f74f1 100644 --- a/3.8/bullseye/Dockerfile +++ b/3.8/bullseye/Dockerfile @@ -49,7 +49,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -89,43 +89,25 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==57.5.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.8/slim-bookworm/Dockerfile b/3.8/slim-bookworm/Dockerfile index 572efa252..a368693f3 100644 --- a/3.8/slim-bookworm/Dockerfile +++ b/3.8/slim-bookworm/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -123,52 +123,25 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==57.5.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.8/slim-bullseye/Dockerfile b/3.8/slim-bullseye/Dockerfile index 540282f8e..798393abc 100644 --- a/3.8/slim-bullseye/Dockerfile +++ b/3.8/slim-bullseye/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -123,52 +123,25 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==57.5.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.9/alpine3.19/Dockerfile b/3.9/alpine3.19/Dockerfile index 416d1bf59..8632c56f2 100644 --- a/3.9/alpine3.19/Dockerfile +++ b/3.9/alpine3.19/Dockerfile @@ -77,7 +77,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -118,43 +118,25 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==58.1.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 58.1.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.9/alpine3.20/Dockerfile b/3.9/alpine3.20/Dockerfile index d92ff2f66..91044e1a8 100644 --- a/3.9/alpine3.20/Dockerfile +++ b/3.9/alpine3.20/Dockerfile @@ -77,7 +77,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() @@ -118,43 +118,25 @@ RUN set -eux; \ ; \ apk del --no-network .build-deps; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==58.1.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 58.1.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.9/bookworm/Dockerfile b/3.9/bookworm/Dockerfile index 351067980..fe0ba4cee 100644 --- a/3.9/bookworm/Dockerfile +++ b/3.9/bookworm/Dockerfile @@ -49,7 +49,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -88,43 +88,25 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==58.1.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 58.1.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.9/bullseye/Dockerfile b/3.9/bullseye/Dockerfile index 0a18bea1a..fbe07aa6e 100644 --- a/3.9/bullseye/Dockerfile +++ b/3.9/bullseye/Dockerfile @@ -49,7 +49,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -88,43 +88,25 @@ RUN set -eux; \ \ ldconfig; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==58.1.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 58.1.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.9/slim-bookworm/Dockerfile b/3.9/slim-bookworm/Dockerfile index 49f0dc94b..b29051af5 100644 --- a/3.9/slim-bookworm/Dockerfile +++ b/3.9/slim-bookworm/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -122,52 +122,25 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==58.1.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 58.1.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/3.9/slim-bullseye/Dockerfile b/3.9/slim-bullseye/Dockerfile index 5067bbb6f..956ede228 100644 --- a/3.9/slim-bullseye/Dockerfile +++ b/3.9/slim-bullseye/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-option-checking=fatal \ --enable-shared \ --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ @@ -122,52 +122,25 @@ RUN set -eux; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ rm -rf /var/lib/apt/lists/*; \ \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + 'setuptools==58.1.0' \ + wheel \ + ; \ + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 58.1.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 939355f8b..bbfc48193 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -176,7 +176,7 @@ RUN set -eux; \ --with-lto \ {{ ) end -}} --with-system-expat \ - --without-ensurepip \ + --with-ensurepip \ ; \ nproc="$(nproc)"; \ {{ if is_alpine then ( -}} @@ -259,63 +259,27 @@ RUN set -eux; \ {{ ) else "" end -}} {{ ) end -}} \ - python3 --version + export PYTHONDONTWRITEBYTECODE=1; \ + python3 --version; \ +{{ if .setuptools then ( -}} + \ + pip3 install \ + --disable-pip-version-check \ + --no-cache-dir \ + --no-compile \ + {{ "setuptools==\( .setuptools.version )" | @sh }} \ + wheel \ + ; \ +{{ ) else "" end -}} + pip3 --version # make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ + for src in idle3 pip3 pydoc3 python3 python3-config; do \ dst="$(echo "$src" | tr -d 3)"; \ [ -s "/usr/local/bin/$src" ]; \ [ ! -e "/usr/local/bin/$dst" ]; \ ln -svT "$src" "/usr/local/bin/$dst"; \ done -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION {{ .pip.version }} -{{ if .setuptools then ( -}} -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION {{ .setuptools.version }} -{{ ) else "" end -}} -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL {{ ."get-pip".url }} -ENV PYTHON_GET_PIP_SHA256 {{ ."get-pip".sha256 }} - -RUN set -eux; \ - \ -{{ if is_slim then ( -}} - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ -{{ ) else "" end -}} - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ -{{ if is_slim then ( -}} - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ -{{ ) else "" end -}} - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ -{{ if .setuptools then ( -}} - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change - wheel \ -{{ ) else ( -}} - --no-setuptools \ - --no-wheel \ -{{ ) end -}} - ; \ - rm -f get-pip.py; \ - \ - pip --version - CMD ["python3"] diff --git a/Dockerfile-windows.template b/Dockerfile-windows.template index da01b7033..78d5aaa9d 100644 --- a/Dockerfile-windows.template +++ b/Dockerfile-windows.template @@ -22,7 +22,7 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en 'PrependPath=1', \ 'Shortcuts=0', \ 'Include_doc=0', \ - 'Include_pip=0', \ + 'Include_pip=1', \ 'Include_test=0' \ ) \ ).ExitCode; \ @@ -42,45 +42,18 @@ RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($en Remove-Item python.exe -Force; \ Remove-Item $env:TEMP/Python*.log -Force; \ \ - Write-Host 'Complete.' - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION {{ .pip.version }} -{{ if .setuptools then ( -}} -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION {{ .setuptools.version }} -{{ ) else "" end -}} -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL {{ ."get-pip".url }} -ENV PYTHON_GET_PIP_SHA256 {{ ."get-pip".sha256 }} - -RUN Write-Host ('Downloading get-pip.py ({0}) ...' -f $env:PYTHON_GET_PIP_URL); \ - [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; \ - Invoke-WebRequest -Uri $env:PYTHON_GET_PIP_URL -OutFile 'get-pip.py'; \ - Write-Host ('Verifying sha256 ({0}) ...' -f $env:PYTHON_GET_PIP_SHA256); \ - if ((Get-FileHash 'get-pip.py' -Algorithm sha256).Hash -ne $env:PYTHON_GET_PIP_SHA256) { \ - Write-Host 'FAILED!'; \ - exit 1; \ - }; \ - \ $env:PYTHONDONTWRITEBYTECODE = '1'; \ +{{ if .setuptools then ( -}} \ - Write-Host ('Installing pip=={0} ...' -f $env:PYTHON_PIP_VERSION); \ - python get-pip.py \ + Write-Host ('Installing setuptools and wheel ...'); \ + pip install \ --disable-pip-version-check \ --no-cache-dir \ --no-compile \ - ('pip=={0}' -f $env:PYTHON_PIP_VERSION) \ -{{ if .setuptools then ( -}} - ('setuptools=={0}' -f $env:PYTHON_SETUPTOOLS_VERSION) \ - # get-pip.py installs wheel by default, adding in case get-pip defaults change + 'setuptools=={{ .setuptools.version }}' \ wheel \ -{{ ) else ( -}} - --no-setuptools \ - --no-wheel \ -{{ ) end -}} ; \ - Remove-Item get-pip.py -Force; \ +{{ ) else "" end -}} \ Write-Host 'Verifying pip install ...'; \ pip --version; \ diff --git a/versions.json b/versions.json index 641a64c5c..b24854d2c 100644 --- a/versions.json +++ b/versions.json @@ -1,13 +1,5 @@ { "3.10": { - "get-pip": { - "sha256": "bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a", - "url": "https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py", - "version": "https://github.com/pypa/get-pip/commit/def4aec84b261b939137dd1c69eff0aabb4a7bf4" - }, - "pip": { - "version": "23.0.1" - }, "setuptools": { "version": "65.5.1" }, @@ -22,14 +14,6 @@ "version": "3.10.15" }, "3.11": { - "get-pip": { - "sha256": "bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a", - "url": "https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py", - "version": "https://github.com/pypa/get-pip/commit/def4aec84b261b939137dd1c69eff0aabb4a7bf4" - }, - "pip": { - "version": "24.0" - }, "setuptools": { "version": "65.5.1" }, @@ -44,14 +28,6 @@ "version": "3.11.10" }, "3.12": { - "get-pip": { - "sha256": "bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a", - "url": "https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py", - "version": "https://github.com/pypa/get-pip/commit/def4aec84b261b939137dd1c69eff0aabb4a7bf4" - }, - "pip": { - "version": "24.2" - }, "variants": [ "bookworm", "slim-bookworm", @@ -65,14 +41,6 @@ "version": "3.12.6" }, "3.13-rc": { - "get-pip": { - "sha256": "bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a", - "url": "https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py", - "version": "https://github.com/pypa/get-pip/commit/def4aec84b261b939137dd1c69eff0aabb4a7bf4" - }, - "pip": { - "version": "24.2" - }, "variants": [ "bookworm", "slim-bookworm", @@ -86,14 +54,6 @@ "version": "3.13.0rc2" }, "3.8": { - "get-pip": { - "sha256": "bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a", - "url": "https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py", - "version": "https://github.com/pypa/get-pip/commit/def4aec84b261b939137dd1c69eff0aabb4a7bf4" - }, - "pip": { - "version": "23.0.1" - }, "setuptools": { "version": "57.5.0" }, @@ -108,14 +68,6 @@ "version": "3.8.20" }, "3.9": { - "get-pip": { - "sha256": "bc37786ec99618416cc0a0ca32833da447f4d91ab51d2c138dd15b7af21e8e9a", - "url": "https://github.com/pypa/get-pip/raw/def4aec84b261b939137dd1c69eff0aabb4a7bf4/public/get-pip.py", - "version": "https://github.com/pypa/get-pip/commit/def4aec84b261b939137dd1c69eff0aabb4a7bf4" - }, - "pip": { - "version": "23.0.1" - }, "setuptools": { "version": "58.1.0" }, diff --git a/versions.sh b/versions.sh index ccd045303..e99d6679f 100755 --- a/versions.sh +++ b/versions.sh @@ -17,14 +17,6 @@ else fi versions=( "${versions[@]%/}" ) -getPipCommit="$( - wget -qO- --header 'Accept: application/json' 'https://github.com/pypa/get-pip/commits/main/public/get-pip.py.atom' \ - | jq -r '.payload | first(.commitGroups[].commits[].oid)' -)" -getPipUrl="https://github.com/pypa/get-pip/raw/$getPipCommit/public/get-pip.py" -getPipSha256="$(wget -qO- "$getPipUrl" | sha256sum | cut -d' ' -f1)" -export getPipCommit getPipUrl getPipSha256 - has_linux_version() { local dir="$1"; shift local dirVersion="$1"; shift @@ -126,16 +118,12 @@ for version in "${versions[@]}"; do wget -qO- "https://github.com/python/cpython/raw/v$fullVersion/Lib/ensurepip/__init__.py" \ | grep -E '^[^[:space:]]+_VERSION[[:space:]]*=' )" - pipVersion="$(sed -nre 's/^_PIP_VERSION[[:space:]]*=[[:space:]]*"(.*?)".*/\1/p' <<<"$ensurepipVersions")" - if [ -z "$pipVersion" ]; then - echo >&2 "error: $version: missing pip version" - exit 1 - fi - if ! wget -q -O /dev/null -o /dev/null --spider "https://pypi.org/pypi/pip/$pipVersion/json"; then - echo >&2 "error: $version: pip version ($pipVersion) seems to be invalid?" - exit 1 - fi + # Note: We don't extract the pip version here, since our policy is now to use the pip version + # that is installed during the Python build (which is the version bundled in ensurepip), and + # to not support overriding it. + + # TODO remove setuptools version handling entirely once Python 3.11 is EOL setuptoolsVersion="$(sed -nre 's/^_SETUPTOOLS_VERSION[[:space:]]*=[[:space:]]*"(.*?)".*/\1/p' <<<"$ensurepipVersions")" case "$rcVersion" in 3.8 | 3.9 | 3.10 | 3.11) @@ -171,22 +159,12 @@ for version in "${versions[@]}"; do ;; esac - # TODO wheelVersion, somehow: https://github.com/docker-library/python/issues/365#issuecomment-914669320 - - echo "$version: $fullVersion (pip $pipVersion${setuptoolsVersion:+, setuptools $setuptoolsVersion}${hasWindows:+, windows})" + echo "$version: $fullVersion" export fullVersion pipVersion setuptoolsVersion hasWindows json="$(jq <<<"$json" -c ' .[env.version] = { version: env.fullVersion, - pip: { - version: env.pipVersion, - }, - "get-pip": { - version: "https://github.com/pypa/get-pip/commit/\(env.getPipCommit)", - url: env.getPipUrl, - sha256: env.getPipSha256, - }, variants: [ ( "bookworm",