-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Packaging] Use Python 3.9 in RHEL 8's RPM #22606
Conversation
Off-topic: Personally, I don't really like the inconsistency of
|
# - On Mariner 1.0, 'python3' is Python 3.7 | ||
# - On Mariner 2.0, 'python3' is Python 3.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is good. Mariner should have specific versions of Python packages (microsoft/azurelinux#3058):
Explicit is better than implicit.
-- PEP 20 – The Zen of Python
@@ -6,20 +6,22 @@ FROM registry.access.redhat.com/ubi8/ubi:${tag} AS build-env | |||
ARG cli_version=dev | |||
|
|||
RUN yum update -y | |||
RUN yum install -y wget rpm-build gcc libffi-devel python3-devel openssl-devel make bash diffutils patch dos2unix python3-virtualenv perl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use venv
built-in module now. No need to install python3-virtualenv
.
RHEL 8's python3-virtualenv
actually requires Python 3.6.
# yum install python3-virtualenv
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 2:24:15 ago on Wed May 25 04:37:38 2022.
Dependencies resolved.
===========================================================================================================================
Package Architecture Version Repository Size
===========================================================================================================================
Installing:
python3-virtualenv noarch 15.1.0-21.module+el8.5.0+12207+5c5719bc ubi-8-appstream 101 k
Upgrading:
chkconfig x86_64 1.19.1-1.el8 ubi-8-baseos 198 k
platform-python x86_64 3.6.8-45.el8 ubi-8-baseos 85 k
python3-libs x86_64 3.6.8-45.el8 ubi-8-baseos 7.8 M
Installing dependencies:
libpkgconf x86_64 1.4.2-1.el8 ubi-8-baseos 35 k
pkgconf x86_64 1.4.2-1.el8 ubi-8-baseos 38 k
pkgconf-m4 noarch 1.4.2-1.el8 ubi-8-baseos 17 k
pkgconf-pkg-config x86_64 1.4.2-1.el8 ubi-8-baseos 15 k
platform-python-devel x86_64 3.6.8-45.el8 ubi-8-appstream 250 k
platform-python-pip noarch 9.0.3-22.el8 ubi-8-baseos 1.6 M
python-rpm-macros noarch 3-41.el8 ubi-8-appstream 15 k
python-srpm-macros noarch 3-41.el8 ubi-8-appstream 15 k
python3-pip noarch 9.0.3-22.el8 ubi-8-appstream 20 k
python3-rpm-generators noarch 5-7.el8 ubi-8-appstream 25 k
python3-rpm-macros noarch 3-41.el8 ubi-8-appstream 14 k
python3-setuptools noarch 39.2.0-6.el8 ubi-8-baseos 163 k
python3-wheel-wheel noarch 1:0.31.1-3.module+el8.5.0+12207+5c5719bc ubi-8-appstream 45 k
python36 x86_64 3.6.8-38.module+el8.5.0+12207+5c5719bc ubi-8-appstream 19 k
python36-devel x86_64 3.6.8-38.module+el8.5.0+12207+5c5719bc ubi-8-appstream 17 k
Enabling module streams:
python36 3.6
Transaction Summary
===========================================================================================================================
Install 16 Packages
Upgrade 3 Packages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also remove python3-virtualenv
in centos7.dockerfile
?
There are many |
You have sharp eyes! Because Mariner 2.0 removed many packages to make the docker image as small as possible. |
Description
Red Hat Enterprise Linux (RHEL) 8 now has Python 3.6, 3.8, and 3.9: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_basic_system_settings/assembly_installing-and-using-python_configuring-basic-system-settings
Since Python 3.6 has been deprecated (#19858), we use Python 3.9 on RHEL 8.