#62 [EPEL8] Prepare support for Python 3.11
Merged a year ago by churchyard. Opened a year ago by churchyard.
rpms/ churchyard/epel-rpm-macros epel8-python3.11  into  epel8

file modified
+7 -3
@@ -1,6 +1,6 @@ 

  Name:           epel-rpm-macros

  Version:        8

- Release:        38

+ Release:        39

  Summary:        Extra Packages for Enterprise Linux RPM macros

  

  License:        GPLv2
@@ -41,13 +41,14 @@ 

  # Make sure EPEL8's Python 3 packages use /usr/bin/python3.{6,8,9} instead of /usr/libexec/platform-python.

  # This will install the python3X-rpm-macros version corresponding to the python3X-devel version installed.

  # If multiple versions are installed together, it will prefer python36-rpm-macros, the default Python version.

- Requires:       (python-modular-rpm-macros if (python36-devel or python38-devel or python39-devel))

+ Requires:       (python-modular-rpm-macros if (python36-devel or python38-devel or python39-devel or python3.11-devel))

  # We use weak dependencies here in order to avoid creating conflicts between

  # the different python3X-devel packages.

  Recommends:     (python36-rpm-macros if python36-devel)

  Suggests:       (python38-rpm-macros if python38-devel)

  Suggests:       (python39-rpm-macros if python39-devel)

- # # python3-rpm-macros is already pulled in by python3X-devel

+ Suggests:       (python3.11-rpm-macros if python3.11-devel)

+ # # python3-rpm-generators is already pulled in by python3X-devel

  # (indirectly through platform-python-devel by python36-devel and directly by the rest),

  # but we explictly Require it here, as it's needed by pythondist.attr.

  Requires:       (python3-rpm-generators if python-modular-rpm-macros)
@@ -125,6 +126,9 @@ 

  

  

  %changelog

+ * Fri Apr 07 2023 Miro Hrončok <mhroncok@redhat.com> - 8-39

+ - Prepare support for Python 3.11

+ 

  * Fri Mar 10 2023 Maxwell G <maxwell@gtmx.me> - 8-38

  - Backport rpmautospec fallback macros

  

Python 3.11 is coming to RHEL 8 soon.
See https://bugzilla.redhat.com/show_bug.cgi?id=2137139

This could be shipped in EPEL 8 Next first,
but considering the change is harmless when python3.11-devel is not available
in the repos, it's easier to add it to EPEL 8 directly.

There is a slight difference compared to the older Pythons:
The package names now include the dot in the Python version (3.11 vs. 36, 38, 39).
That was a deliberate decision on the RHEL side
to make the package names equal to the RHEL 9 ones.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

I wish to test this first, so please don't merge yet.

I'd also like to test it with the actual packages once they hit c8s. I've marked this as WIP:.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

rebased onto f260737

a year ago

I rebased this and fixed the changelog conflicts. Hope you don't mind...

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/a4eb6446d2c148b19d605ca42c49a956

c8s should have the packages now, so we can test this

rebased onto 6a54893

a year ago

Rebased. Will test with the CI scratchbuild.

1 new commit added

  • Fix spec-comment
a year ago

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/a861ae88ca7f426dabeab533e14454fb

I've verified that with epel-rpm-macros-8-39, when I install python3.11-devel to a centos-stream+epel-next-8-x86_64 mock, I get:

Installed:
mpdecimal-2.5.1-3.el8.x86_64
python3-rpm-generators-5-8.el8.noarch
python3.11-3.11.2-2.el8.x86_64
python3.11-devel-3.11.2-2.el8.x86_64
python3.11-libs-3.11.2-2.el8.x86_64
python3.11-pip-wheel-22.3.1-3.el8.noarch
python3.11-rpm-macros-3.11.2-2.el8.noarch
python3.11-setuptools-wheel-65.5.1-2.el8.noarch

That is good.

Using https://gitlab.com/redhat/centos-stream/rpms/python3.11-requests/-/tree/e93178d29d4a6e61fa4833e49f6ec4b054927a1c for a test:

[python3.11-requests (c8s *)]$ git diff
diff --git a/python3.11-requests.spec b/python3.11-requests.spec
index dc926cf..87a3e2c 100644
--- a/python3.11-requests.spec
+++ b/python3.11-requests.spec
@@ -1,4 +1,3 @@
-%global __python3 /usr/bin/python3.11
 %global python3_pkgversion 3.11

 # RHEL: Tests disabled due to missing dependencies
@@ -19,7 +18,6 @@ Patch0:         requests-2.28.1-system-certs.patch
 BuildArch:      noarch

 BuildRequires:  python%{python3_pkgversion}-devel
-BuildRequires:  python%{python3_pkgversion}-rpm-macros
 BuildRequires:  python%{python3_pkgversion}-charset-normalizer
 BuildRequires:  python%{python3_pkgversion}-urllib3
 BuildRequires:  python%{python3_pkgversion}-idna
@@ -34,10 +32,6 @@ BuildRequires:  python%{python3_pkgversion}-pytest-mock
 BuildRequires:  python%{python3_pkgversion}-trustme
 %endif

-Requires:  python%{python3_pkgversion}-charset-normalizer
-Requires:  python%{python3_pkgversion}-urllib3
-Requires:  python%{python3_pkgversion}-idna 
-
 %description
 Most existing Python modules for sending HTTP requests are extremely verbose and
 cumbersome. Python’s built-in urllib2 module provides most of the HTTP

[python3.11-requests (c8s *)]$ centpkg srpm
Not downloading already downloaded requests-v2.28.1.tar.gz
setting SOURCE_DATE_EPOCH=1669680000
Wrote: /home/churchyard/rpmbuild/centpkg/python3.11-requests/python3.11-requests-2.28.1-1.el8.src.rpm

[python3.11-requests (c8s *)]$ mock -r centos-stream+epel-next-8-x86_64 -Nn python3.11-requests-2.28.1-1.el8.src.rpm
...
Installing:
 python3.11-charset-normalizer  noarch  2.1.0-1.el8     appstream  100 k
 python3.11-devel               x86_64  3.11.2-2.el8    appstream  291 k
 python3.11-idna                noarch  3.4-1.el8       appstream  100 k
 python3.11-setuptools          noarch  65.5.1-2.el8    appstream  2.1 M
 python3.11-urllib3             noarch  1.26.12-1.el8   appstream  263 k
Installing dependencies:
 mpdecimal                      x86_64  2.5.1-3.el8     appstream   93 k
 python3-rpm-generators         noarch  5-8.el8         appstream   25 k
 python3.11                     x86_64  3.11.2-2.el8    appstream   30 k
 python3.11-libs                x86_64  3.11.2-2.el8    appstream   11 M
 python3.11-pip-wheel           noarch  22.3.1-3.el8    appstream  1.4 M
 python3.11-pysocks             noarch  1.7.1-1.el8     appstream   40 k
 python3.11-rpm-macros          noarch  3.11.2-2.el8    appstream   12 k
 python3.11-setuptools-wheel    noarch  65.5.1-2.el8    appstream  720 k
 python3.11-six                 noarch  1.16.0-1.el8    appstream   43 k
...

[python3.11-requests (c8s *)]$ rpm -qPp /var/lib/mock/centos-stream+epel-next-8-x86_64/result/python3.11-requests-2.28.1-1.el8.noarch.rpm 
python3.11-requests = 2.28.1-1.el8
python3.11dist(requests) = 2.28.1

[python3.11-requests (c8s *)]$ rpm -qRp /var/lib/mock/centos-stream+epel-next-8-x86_64/result/python3.11-requests-2.28.1-1.el8.noarch.rpm 
python(abi) = 3.11
python3.11dist(charset-normalizer) >= 2
python3.11dist(charset-normalizer) < 3
python3.11dist(idna) >= 2.5
python3.11dist(idna) < 4
python3.11dist(urllib3) >= 1.21.1
python3.11dist(urllib3) < 1.27
rpmlib(...) <= ...

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/91e6b8bf9e4e45bfbf0f5a3c162055b5

@gotmax23 Looking good? Do you intend to test this more?

LGTM. I tested this in https://copr.fedorainfracloud.org/coprs/gotmax23/epel-rpm-macros-8-39 with ansible. python3.11-rpm-macros was pulled in automatically, %python3_version was set correctly so %py3_shebang_fix worked, and %__python3 was apparently set correctly. I also did some testing in a local mock chroot.

Feel free to merge this as a provenpackager or I'll do it as a maintainer later.

Pull-Request has been merged by churchyard

a year ago

Building epel-rpm-macros-8-39 for epel8-candidate
Created task: 99678343
Task info: https://koji.fedoraproject.org/koji/taskinfo?taskID=99678343

Metadata