Skip to content

Commit 827d781

Browse files
committed
Distgen generated content
1 parent e912326 commit 827d781

10 files changed

Lines changed: 29 additions & 35 deletions

File tree

2.7/s2i/bin/assemble

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,15 @@ mv /tmp/src/* "$HOME"
5858
# set permissions for any installed artifacts
5959
fix-permissions /opt/app-root -P
6060

61-
# Python 2 only code, Python 3 uses bundled wheel from Fedora
61+
# Python <3.7 only code, Python 3.7+ uses bundled wheel from Fedora
6262
# We have to first upgrade pip to at least 19.3 because:
6363
# * pip < 9 does not support different packages' versions for Python 2/3
6464
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels
6565
# support platforms like ppc64le, aarch64 or armv7
66-
echo "---> Upgrading pip to version <21.0 (The last Python 2 compatible version) ..."
67-
if ! pip install -U "pip<21.0"; then
68-
echo "WARNING: Installation of 'pip<21.0' failed, trying again from official PyPI with pip --isolated install"
69-
pip install --isolated -U "pip<21.0"
66+
echo "---> Upgrading pip to latest version supported for Python $PYTHON_VERSION ..."
67+
if ! pip install -U "pip"; then
68+
echo "WARNING: Installation of 'pip' failed, trying again from official PyPI with pip --isolated install"
69+
pip install --isolated -U "pip"
7070
fi
7171

7272
if [[ ! -z "$UPGRADE_PIP_TO_LATEST" ]]; then

3.10/Dockerfile.fedora

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ COPY 3.10/s2i/bin/ $STI_SCRIPTS_PATH
5050
# Copy extra files to the image.
5151
COPY 3.10/root/ /
5252

53-
# Python 3 only
53+
# Python 3.7+ only
5454
# Yes, the directory below is already copied by the previous command.
5555
# The problem here is that the wheels directory is copied as a symlink.
5656
# Only if you specify symlink directly as a source, COPY copies all the
@@ -63,7 +63,7 @@ COPY 3.10/root/opt/wheels /opt/wheels
6363
# writable as OpenShift default security model is to run the container
6464
# under random UID.
6565
RUN python3.10 -m venv ${APP_ROOT} && \
66-
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
66+
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
6767
# We have to upgrade pip to a newer verison because: \
6868
# * pip < 9 does not support different packages' versions for Python 2/3 \
6969
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \

3.6/Dockerfile.rhel8

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ COPY 3.6/s2i/bin/ $STI_SCRIPTS_PATH
5555
# Copy extra files to the image.
5656
COPY 3.6/root/ /
5757

58-
# Python 3 only
59-
# Yes, the directory below is already copied by the previous command.
60-
# The problem here is that the wheels directory is copied as a symlink.
61-
# Only if you specify symlink directly as a source, COPY copies all the
62-
# files from the symlink destination.
63-
COPY 3.6/root/opt/wheels /opt/wheels
6458
# - Create a Python virtual environment for use by any application to avoid
6559
# potential conflicts with Python packages preinstalled in the main Python
6660
# installation.
@@ -69,16 +63,6 @@ COPY 3.6/root/opt/wheels /opt/wheels
6963
# under random UID.
7064
RUN \
7165
virtualenv-$PYTHON_VERSION ${APP_ROOT} && \
72-
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
73-
# We have to upgrade pip to a newer verison because: \
74-
# * pip < 9 does not support different packages' versions for Python 2/3 \
75-
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
76-
# support platforms like ppc64le, aarch64 or armv7 \
77-
# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \
78-
# because it's tested better then whatever version from PyPI and contains useful patches. \
79-
# We have to do it here (in the macro) so the permissions are correctly fixed and pip is able \
80-
# to reinstall itself in the next build phases in the assemble script if user wants the latest version \
81-
${APP_ROOT}/bin/pip install /opt/wheels/pip-* && \
8266
rm -r /opt/wheels && \
8367
chown -R 1001:0 ${APP_ROOT} && \
8468
fix-permissions ${APP_ROOT} -P && \

3.6/s2i/bin/assemble

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,16 @@ mv /tmp/src/* "$HOME"
5757
# set permissions for any installed artifacts
5858
fix-permissions /opt/app-root -P
5959

60+
# Python <3.7 only code, Python 3.7+ uses bundled wheel from Fedora
61+
# We have to first upgrade pip to at least 19.3 because:
62+
# * pip < 9 does not support different packages' versions for Python 2/3
63+
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels
64+
# support platforms like ppc64le, aarch64 or armv7
65+
echo "---> Upgrading pip to latest version supported for Python $PYTHON_VERSION ..."
66+
if ! pip install -U "pip"; then
67+
echo "WARNING: Installation of 'pip' failed, trying again from official PyPI with pip --isolated install"
68+
pip install --isolated -U "pip"
69+
fi
6070

6171
if [[ ! -z "$UPGRADE_PIP_TO_LATEST" ]]; then
6272
echo "---> Upgrading pip, setuptools and wheel to latest version ..."

3.8/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ COPY 3.8/s2i/bin/ $STI_SCRIPTS_PATH
5858
# Copy extra files to the image.
5959
COPY 3.8/root/ /
6060

61-
# Python 3 only
61+
# Python 3.7+ only
6262
# Yes, the directory below is already copied by the previous command.
6363
# The problem here is that the wheels directory is copied as a symlink.
6464
# Only if you specify symlink directly as a source, COPY copies all the
@@ -72,7 +72,7 @@ COPY 3.8/root/opt/wheels /opt/wheels
7272
# under random UID.
7373
RUN source scl_source enable rh-python38 && \
7474
python3.8 -m venv ${APP_ROOT} && \
75-
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
75+
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
7676
# We have to upgrade pip to a newer verison because: \
7777
# * pip < 9 does not support different packages' versions for Python 2/3 \
7878
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \

3.8/Dockerfile.rhel7

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ COPY 3.8/s2i/bin/ $STI_SCRIPTS_PATH
6464
# Copy extra files to the image.
6565
COPY 3.8/root/ /
6666

67-
# Python 3 only
67+
# Python 3.7+ only
6868
# Yes, the directory below is already copied by the previous command.
6969
# The problem here is that the wheels directory is copied as a symlink.
7070
# Only if you specify symlink directly as a source, COPY copies all the
@@ -78,7 +78,7 @@ COPY 3.8/root/opt/wheels /opt/wheels
7878
# under random UID.
7979
RUN source scl_source enable rh-python38 && \
8080
python3.8 -m venv ${APP_ROOT} && \
81-
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
81+
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
8282
# We have to upgrade pip to a newer verison because: \
8383
# * pip < 9 does not support different packages' versions for Python 2/3 \
8484
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \

3.8/Dockerfile.rhel8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ COPY 3.8/s2i/bin/ $STI_SCRIPTS_PATH
5454
# Copy extra files to the image.
5555
COPY 3.8/root/ /
5656

57-
# Python 3 only
57+
# Python 3.7+ only
5858
# Yes, the directory below is already copied by the previous command.
5959
# The problem here is that the wheels directory is copied as a symlink.
6060
# Only if you specify symlink directly as a source, COPY copies all the
@@ -68,7 +68,7 @@ COPY 3.8/root/opt/wheels /opt/wheels
6868
# under random UID.
6969
RUN \
7070
python3.8 -m venv ${APP_ROOT} && \
71-
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
71+
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
7272
# We have to upgrade pip to a newer verison because: \
7373
# * pip < 9 does not support different packages' versions for Python 2/3 \
7474
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \

3.9/Dockerfile.c9s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ COPY 3.9/s2i/bin/ $STI_SCRIPTS_PATH
5050
# Copy extra files to the image.
5151
COPY 3.9/root/ /
5252

53-
# Python 3 only
53+
# Python 3.7+ only
5454
# Yes, the directory below is already copied by the previous command.
5555
# The problem here is that the wheels directory is copied as a symlink.
5656
# Only if you specify symlink directly as a source, COPY copies all the
@@ -63,7 +63,7 @@ COPY 3.9/root/opt/wheels /opt/wheels
6363
# writable as OpenShift default security model is to run the container
6464
# under random UID.
6565
RUN python3.9 -m venv ${APP_ROOT} && \
66-
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
66+
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
6767
# We have to upgrade pip to a newer verison because: \
6868
# * pip < 9 does not support different packages' versions for Python 2/3 \
6969
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \

3.9/Dockerfile.rhel8

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ COPY 3.9/s2i/bin/ $STI_SCRIPTS_PATH
5454
# Copy extra files to the image.
5555
COPY 3.9/root/ /
5656

57-
# Python 3 only
57+
# Python 3.7+ only
5858
# Yes, the directory below is already copied by the previous command.
5959
# The problem here is that the wheels directory is copied as a symlink.
6060
# Only if you specify symlink directly as a source, COPY copies all the
@@ -68,7 +68,7 @@ COPY 3.9/root/opt/wheels /opt/wheels
6868
# under random UID.
6969
RUN \
7070
python3.9 -m venv ${APP_ROOT} && \
71-
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
71+
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
7272
# We have to upgrade pip to a newer verison because: \
7373
# * pip < 9 does not support different packages' versions for Python 2/3 \
7474
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \

3.9/Dockerfile.rhel9

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ COPY 3.9/s2i/bin/ $STI_SCRIPTS_PATH
5353
# Copy extra files to the image.
5454
COPY 3.9/root/ /
5555

56-
# Python 3 only
56+
# Python 3.7+ only
5757
# Yes, the directory below is already copied by the previous command.
5858
# The problem here is that the wheels directory is copied as a symlink.
5959
# Only if you specify symlink directly as a source, COPY copies all the
@@ -67,7 +67,7 @@ COPY 3.9/root/opt/wheels /opt/wheels
6767
# under random UID.
6868
RUN \
6969
python3.9 -m venv ${APP_ROOT} && \
70-
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
70+
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
7171
# We have to upgrade pip to a newer verison because: \
7272
# * pip < 9 does not support different packages' versions for Python 2/3 \
7373
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \

0 commit comments

Comments
 (0)