Skip to content

Commit

Permalink
Remove the old cruft related to Python 2
Browse files Browse the repository at this point in the history
Also, we don't build CentOS images anymore.
  • Loading branch information
befeleme authored and frenzymadness committed Sep 9, 2024
1 parent f8f9990 commit b9929ad
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 22 deletions.
3 changes: 0 additions & 3 deletions examples/numpy-test-app/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
gunicorn<20.0.0; python_version < '3.5'
gunicorn>=20.0.0; python_version >= '3.5'
# Numpy 1.17 dropped support for Python 2
numpy<1.17.0; python_version < '3.6'
# Numpy 1.23.0 no longer builds from source
# on RHEL 7 with old GCC
numpy<1.23.0; python_version >= '3.6' and python_version < '3.11'
Expand Down
6 changes: 2 additions & 4 deletions src/Dockerfile-minimal.template
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,8 @@ WORKDIR ${HOME}
# under random UID.
RUN \
python{{ spec.version }} -m venv ${APP_ROOT} && \
# Python 3 only code, Python 2 installs pip from PyPI in the assemble script. \
# We have to upgrade pip to a newer verison because: \
# * pip < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
# We have to upgrade pip to a newer version because \
# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
# support platforms like ppc64le, aarch64 or armv7 \
# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \
# because it's tested better then whatever version from PyPI and contains useful patches. \
Expand Down
5 changes: 2 additions & 3 deletions src/centos-stream/macros.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ ENV NAME=python3 \
RUN python{{ spec.version }} -m venv ${APP_ROOT} && \
{% if spec.version != "3.6" %}
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
# We have to upgrade pip to a newer verison because: \
# * pip < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
# We have to upgrade pip to a newer verison because \
# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
# support platforms like ppc64le, aarch64 or armv7 \
# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \
# because it's tested better then whatever version from PyPI and contains useful patches. \
Expand Down
5 changes: 2 additions & 3 deletions src/fedora/macros.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ ENV NAME=python3 \
RUN python{{ spec.version }} -m venv ${APP_ROOT} && \
{% if spec.version != "3.6" %}
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
# We have to upgrade pip to a newer verison because: \
# * pip < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
# We have to upgrade pip to a newer verison because \
# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
# support platforms like ppc64le, aarch64 or armv7 \
# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \
# because it's tested better then whatever version from PyPI and contains useful patches. \
Expand Down
1 change: 0 additions & 1 deletion src/rhel

This file was deleted.

9 changes: 4 additions & 5 deletions src/centos/macros.tpl → src/rhel/macros.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ python-{{ spec.short_ver }}-container
{%- endmacro %}

{% macro _image_name(spec) %}
{{ spec.org }}/python-{{ spec.short_ver }}{% if spec.el_version == '7' %}-{{ spec.prod }}{% endif %}
{% endmacro %}
{{ spec.org }}/python-{{ spec.short_ver }}
{%- endmacro %}

{% macro labels(spec) %}
com.redhat.component="{{ _component_name(spec) }}" \
Expand All @@ -34,9 +34,8 @@ RUN \
{% endif %}
{% if spec.version != "3.6" %}
# Python 3.7+ only code, Python <3.7 installs pip from PyPI in the assemble script. \
# We have to upgrade pip to a newer verison because: \
# * pip < 9 does not support different packages' versions for Python 2/3 \
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
# We have to upgrade pip to a newer verison because \
# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels \
# support platforms like ppc64le, aarch64 or armv7 \
# We are newly using wheel from one of the latest stable Fedora releases (from RPM python-pip-wheel) \
# because it's tested better then whatever version from PyPI and contains useful patches. \
Expand Down
5 changes: 2 additions & 3 deletions src/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ fix-permissions /opt/app-root -P

{% if spec.version == "3.6" %}
# Python <3.7 only code, Python 3.7+ uses bundled wheel from Fedora
# We have to first upgrade pip to at least 19.3 because:
# * pip < 9 does not support different packages' versions for Python 2/3
# * pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels
# We have to first upgrade pip to at least 19.3 because
# pip < 19.3 does not support manylinux2014 wheels. Only manylinux2014 (and later) wheels
# support platforms like ppc64le, aarch64 or armv7
echo "---> Upgrading pip to latest version supported for Python $PYTHON_VERSION ..."
if ! pip install -U "pip"; then
Expand Down

0 comments on commit b9929ad

Please # to comment.