This is an automated email from the ASF dual-hosted git repository.

Abacn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new c7a8f93413f Fix Python 3.14 Container Build, Streamline Installation 
(#39659)
c7a8f93413f is described below

commit c7a8f93413fe28a4f83d66c5773263ab316d6f17
Author: Jack McCluskey <[email protected]>
AuthorDate: Thu Aug 6 18:32:17 2026 -0400

    Fix Python 3.14 Container Build, Streamline Installation (#39659)
---
 sdks/python/container/Dockerfile | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/sdks/python/container/Dockerfile b/sdks/python/container/Dockerfile
index a1e17edb82d..acb637521c9 100644
--- a/sdks/python/container/Dockerfile
+++ b/sdks/python/container/Dockerfile
@@ -49,8 +49,6 @@ RUN  \
 
     rm -rf /var/lib/apt/lists/* && \
 
-    pip install --upgrade pip setuptools wheel && \
-
     # Install required packages for Beam Python SDK and common dependencies 
used by users.
     # use --no-deps to ensure the list includes all transitive dependencies.
     # use --prefer-binary to avoid compiling wheels from source when prebuilt 
wheels exist.
@@ -92,18 +90,12 @@ RUN  \
     if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \
         pip install upgrade_ensurepip; \
         python3 -m upgrade_ensurepip; \
-    else \
-        python3 /tmp/upgrade_bundled_pip.py; \
-    fi; \
-    # setuptools is not bundled with ensurepip in Python 3.12+
-    if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \
         find 
/usr/local/lib/python${py_version}/ensurepip/_bundled/setuptools-* -type f ! 
-name $(basename $(ls -v 
/usr/local/lib/python${py_version}/ensurepip/_bundled/setuptools-*-py3-none-any.whl
 | tail -n 1)) -delete; \
-    fi; \
-    find /usr/local/lib/python${py_version}/ensurepip/_bundled/pip-* -type f ! 
-name $(basename $(ls -v 
/usr/local/lib/python${py_version}/ensurepip/_bundled/pip-*-py3-none-any.whl | 
tail -n 1)) -delete; \
-    if [ "${py_version}" = "3.10" ] || [ "${py_version}" = "3.11" ]; then \
         pip uninstall upgrade_ensurepip -y; \
+    else \
+        python3 /tmp/upgrade_bundled_pip.py; \
     fi; \
-    python3 -m ensurepip;
+    find /usr/local/lib/python${py_version}/ensurepip/_bundled/pip-* -type f ! 
-name $(basename $(ls -v 
/usr/local/lib/python${py_version}/ensurepip/_bundled/pip-*-py3-none-any.whl | 
tail -n 1)) -delete;
 
 ENTRYPOINT ["/opt/apache/beam/boot"]
 

Reply via email to