Bug 1982668
| Summary: | Python *-wheel packages in RHEL 9 need to be versioned | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 9 | Reporter: | Tomas Orsava <torsava> |
| Component: | python3.9 | Assignee: | Tomas Orsava <torsava> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Lukáš Zachar <lzachar> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 9.0 | CC: | jkejda, lbalhar, mhroncok, pviktori, torsava |
| Target Milestone: | beta | Keywords: | Triaged |
| Target Release: | --- | Flags: | pm-rhel:
mirror+
|
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python3.9-3.9.9-2.el9 python-pip-21.2.3-5.el9 python-setuptools-53.0.0-8.el9 python-wheel-1:0.36.2-6.el9 | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-08-21 14:58:56 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Tomas Orsava
2021-07-15 11:54:15 UTC
Tech notes:
In Fedora, python-{pip,setuptools,wheel}.spec has something like:
%global python_wheeldir %{_datadir}/python-wheels
python3.10.spec has:
--with-wheel-pkg-dir=%{_datadir}/python-wheels
And python3.9.spec has (hard-coded in 00189-use-rpm-wheels.patch):
_WHEEL_DIR = "/usr/share/python-wheels/"
We might adapt the spec files in Fedora to make the location centrally manageable: We would define %python_wheeldir in python-rpm-macros, use it in python-{pip,setuptools,wheel}.spec as well as python3.x.spec for x >= 10 (we can leave the patch in python3.9.spec as it is and let it eventually die).
In RHEL9+, we would define the %python_wheeldir macro to %{_datadir}/python%{python3_version}-wheels instead (and since we are still on Python 3.9, we would manually adapt 00189-use-rpm-wheels.patch).
Note that we need to keep the %python_wheeldir values in Fedora Rawhide and ELN in sync, otherwise ELN's Python would not work with Rawhide's wheels (or vice versa). We need to chnage the value of %python_wheeldir in RHEL only. In order not to need to redefine the macro over and over again in RHEL 10, 11, 12... we might use some more complex definition and share it across Fedora and RHEL spec, e.g. something like %{_datadir}/python%{?rhel:%{!?eln:%{python3_version}}}-wheels.
Note that python3.xx.spec in RHEL will need to manually define %{python3_version} to %{pybasever} for this to work. We can safely do that in Fedora as well.
Once we have all this ready in RHEL9, we might need to ship the 4 affeted packages via a side tag.
Once RHEL 10 bootstraps from ELN, we might see some build order issues, and we might need to be prepared to solve them.
Note that if we rename the python-wheel-wheel package, the name of the package might need to be updated in the comps list to continue pulling it into the CRB repo. I haven't checked the pull requests but the packages from the copr work well for me and everything looks good. The change is prepared and working in RHEL, but there is time, so I'd like to push it into Fedora first to get it tested there: Fedora rawhide PRs: • python-rpm-macros: https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/112 • python-wheel: https://src.fedoraproject.org/rpms/python-wheel/pull-request/23 • python-setuptools: https://src.fedoraproject.org/rpms/python-setuptools/pull-request/74 • python-pip: https://src.fedoraproject.org/rpms/python-pip/pull-request/94 • python3.10: https://src.fedoraproject.org/rpms/python3.10/pull-request/75 Fedora rawhide/35/ELN-buildroot testing copr: https://copr.fedorainfracloud.org/coprs/torsava/macronized-wheels/builds/ (In reply to Tomas Orsava from comment #5) > The change is prepared and working in RHEL, but there is time, so I'd like > to push it into Fedora first to get it tested there: > > Fedora rawhide PRs: > • python-rpm-macros: > https://src.fedoraproject.org/rpms/python-rpm-macros/pull-request/112 > • python-wheel: > https://src.fedoraproject.org/rpms/python-wheel/pull-request/23 > • python-setuptools: > https://src.fedoraproject.org/rpms/python-setuptools/pull-request/74 > • python-pip: https://src.fedoraproject.org/rpms/python-pip/pull-request/94 > • python3.10: https://src.fedoraproject.org/rpms/python3.10/pull-request/75 > > Fedora rawhide/35/ELN-buildroot testing copr: > https://copr.fedorainfracloud.org/coprs/torsava/macronized-wheels/builds/ Generally, the PRs (except python-rpm-macros) don't change anything, so the release bumps are not needed. I would also like to see the python-virtualenv package changed to use the macros. That way, when I build it in https://copr.fedorainfracloud.org/coprs/churchyard/epel9-prep-work/ it should still work after this change lands in c9s. Note that or virtualenv patch could use sysconfig.get_config_var('WHEEL_PKG_DIR') and only fallback to /usr/share/python-wheels when sysconfig.get_config_var('WHEEL_PKG_DIR') is not set. Since this evaluates on our main Python, is should be always set.
I also plan to test this with virtualenv in EPEL 9. Packages from EPEL 9 / EPEL 9 Next and https://src.fedoraproject.org/rpms/python-virtualenv/pull-request/55 $ mock -r centos-stream-9-x86_64 install tree https://kojipkgs.fedoraproject.org//work/tasks/9951/79789951/python3-virtualenv-20.10.0-2.el9.next.noarch.rpm https://kojipkgs.fedoraproject.org//packages/python-platformdirs/2.3.0/2.el9.next/noarch/python3-platformdirs-2.3.0-2.el9.next.noarch.rpm https://kojipkgs.fedoraproject.org//packages/python-filelock/3.3.1/1.el9/noarch/python3-filelock-3.3.1-1.el9.noarch.rpm https://kojipkgs.fedoraproject.org//packages/python-distlib/0.3.2/1.el9/noarch/python3-distlib-0.3.2-1.el9.noarch.rpm ... Installing : python3-setuptools-wheel-53.0.0-8.el9.noarch 1/12 Installing : python3-pip-wheel-21.2.3-5.el9.noarch 2/12 Installing : python3-wheel-wheel-1:0.36.2-6.el9.noarch 3/12 Installing : expat-2.2.10-4.el9.x86_64 4/12 Installing : python3-3.9.9-2.el9.x86_64 5/12 Installing : python3-libs-3.9.9-2.el9.x86_64 6/12 Installing : python3-setuptools-53.0.0-8.el9.noarch 7/12 Installing : python3-six-1.15.0-7.el9.noarch 8/12 Installing : python3-platformdirs-2.3.0-2.el9.next.noarch 9/12 Installing : python3-filelock-3.3.1-1.el9.noarch 10/12 Installing : python3-distlib-0.3.2-1.el9.noarch 11/12 Installing : python3-virtualenv-20.10.0-2.el9.next.noarch 12/12 ... $ mock -r centos-stream-9-x86_64 shell --unpriv <mock-chroot> sh-5.1$ cd <mock-chroot> sh-5.1$ virtualenv venv created virtual environment CPython3.9.9.final.0-64 in 161ms creator CPython3Posix(dest=/builddir/venv, clear=False, no_vcs_ignore=False, global=False) seeder FromAppData(extra_search_dir=/usr/share/python3-wheels,download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/builddir/.local/share/virtualenv) added seed packages: pip==21.2.3, setuptools==53.0.0, wheel==0.36.2 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator <mock-chroot> sh-5.1$ venv/bin/pip list Package Version ---------- ------- pip 21.2.3 setuptools 53.0.0 wheel 0.36.2 <mock-chroot> sh-5.1$ tree -L 4 venv venv ├── bin │ ├── activate │ ├── activate.csh │ ├── activate.fish │ ├── activate.nu │ ├── activate.ps1 │ ├── activate_this.py │ ├── deactivate.nu │ ├── pip │ ├── pip-3.9 │ ├── pip3 │ ├── pip3.9 │ ├── python -> /usr/bin/python3 │ ├── python3 -> python │ ├── python3.9 -> python │ ├── wheel │ ├── wheel-3.9 │ ├── wheel3 │ └── wheel3.9 ├── lib │ └── python3.9 │ └── site-packages │ ├── __pycache__ │ ├── _distutils_hack │ ├── _virtualenv.pth │ ├── _virtualenv.py │ ├── distutils-precedence.pth │ ├── pip │ ├── pip-21.2.3.dist-info │ ├── pip-21.2.3.virtualenv │ ├── pkg_resources │ ├── setuptools │ ├── setuptools-53.0.0.dist-info │ ├── setuptools-53.0.0.virtualenv │ ├── wheel │ ├── wheel-0.36.2.dist-info │ └── wheel-0.36.2.virtualenv ├── lib64 │ └── python3.9 │ └── site-packages └── pyvenv.cfg 16 directories, 25 files And obligatory: <mock-chroot> sh-5.1$ ls /usr/share/python3-wheels/ pip-21.2.3-py3-none-any.whl setuptools-53.0.0-py3-none-any.whl wheel-0.36.2-py2.py3-none-any.whl <mock-chroot> sh-5.1$ ls /usr/share/python-wheels/ ls: cannot access '/usr/share/python-wheels/': No such file or directory |