From 6f32deea790577c7f2e3f16dcd15214a40a0d36f Mon Sep 17 00:00:00 2001 From: Konstantin Demin Date: Fri, 21 Feb 2025 12:43:10 +0300 Subject: [PATCH] remove remnants after f0d9f41a --- Dockerfile.base | 6 ------ Dockerfile.deps | 6 +++--- build-scripts/image-base.sh | 4 ---- 3 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Dockerfile.base b/Dockerfile.base index fc7e4b3..d2ca12c 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -260,12 +260,6 @@ RUN libpython="${PYTHON_SITE_PACKAGES%/*}" ; \ "${libpython}/turtle.py" \ "${libpython}/turtledemo" \ ; \ - rm -rfv \ - "${PYTHON_SITE_PACKAGES}/pkg_resources/tests" \ - "${PYTHON_SITE_PACKAGES}/setuptools/tests" \ - "${PYTHON_SITE_PACKAGES}/setuptools/_distutils/tests" \ - "${PYTHON_SITE_PACKAGES}/setuptools/_vendor/importlib_resources/tests" \ - ; \ find "${PYTHON_SITE_PACKAGES}/" -iname '*.exe' -ls -delete ; \ python-rm-cache.sh /usr/local diff --git a/Dockerfile.deps b/Dockerfile.deps index e0d2cdb..4f93a85 100644 --- a/Dockerfile.deps +++ b/Dockerfile.deps @@ -62,7 +62,7 @@ RUN w=$(mktemp -d) ; : "${w:?}" ; \ ## avoid changing already present packages RUN find "${PYTHON_SITE_PACKAGES}/" -mindepth 1 -maxdepth 1 -printf '%P\0' \ | sed -zEn \ - -e '/^((pip|setuptools|wheel)-.+\.dist-info|distutils-precedence\.pth|_distutils_hack|pip|pkg_resources|setuptools|wheel)$/p' \ + -e '/^pip(|-.+\.dist-info)$/p' \ | env -C "${PYTHON_SITE_PACKAGES}" xargs -0r \ rm -rf @@ -129,8 +129,8 @@ RUN libpython="${PYTHON_SITE_PACKAGES%/*}" ; \ python3 -m compileall -q -j 2 ; \ find "${PYTHON_SITE_PACKAGES}/" -mindepth 1 -maxdepth 1 -printf '%P\0' \ | sed -zE \ - -e '/\.(dist-info|pth|txt)$/d' \ - -e '/^(pip|pkg_resources|setuptools|wheel)$/d' \ + -e '/\.(dist-info|pth|so|txt)$/d' \ + -e '/^pip$/d' \ | sort -zV \ | env -C "${PYTHON_SITE_PACKAGES}" xargs -0r \ python3 -m compileall -q -j 2 diff --git a/build-scripts/image-base.sh b/build-scripts/image-base.sh index 41c0c44..8ef7f91 100755 --- a/build-scripts/image-base.sh +++ b/build-scripts/image-base.sh @@ -36,10 +36,6 @@ buildah bud \ --build-arg "PYTHONTAG=${PYTHONTAG}" \ --env "PYTHON_SITE_PACKAGES=${PYTHON_SITE_PACKAGES}" \ --unsetenv GPG_KEY \ - --unsetenv PYTHON_PIP_VERSION \ - --unsetenv PYTHON_SETUPTOOLS_VERSION \ - --unsetenv PYTHON_GET_PIP_SHA256 \ - --unsetenv PYTHON_GET_PIP_URL \ c=$(buildah from --pull=never "${img}") || true