RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1947468 - RHEL 9: %{python3_sitelib} and %{python3_sitearch} use the distutils module, deprecated in Python 3.10+
Summary: RHEL 9: %{python3_sitelib} and %{python3_sitearch} use the distutils module, ...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: python-rpm-macros
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: beta
: ---
Assignee: Miro Hrončok
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On: 1946972
Blocks: 1950291
TreeView+ depends on / blocked
 
Reported: 2021-04-08 14:17 UTC by Miro Hrončok
Modified: 2021-05-04 08:53 UTC (History)
0 users

Fixed In Version: python-rpm-macros-3.9-37.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-04 08:53:05 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Miro Hrončok 2021-04-08 14:17:15 UTC
Currently, we define the following macros:

%python3_sitelib %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python3_sitearch %(%{__python3} -Ic "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")

%python_sitelib %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python_sitearch %(%{__python} -Esc "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")

But distutils is deprecated in Python 3.10: https://www.python.org/dev/peps/pep-0632/

We should switch the macros to sysconfig before we introduce Python 3.10+.

A backwards compatible change landed in Fedora Rawhide in https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/96

Let's let it sink in Rawhide for a while and backport it to RHEL 9. I think it is safer to do it before Beta (in case of an unexpected breakage) but this can eventually land even after RHEL 9.0.


Note You need to log in before you can comment on or make changes to this bug.