#63 Stop overriding macros that are now in RHEL 8.7
Merged a year ago by gotmax23. Opened a year ago by gotmax23.
rpms/ gotmax23/epel-rpm-macros 8.7_python_  into  epel8

file modified
+4 -1
@@ -1,6 +1,6 @@ 

  Name:           epel-rpm-macros

  Version:        8

- Release:        36

+ Release:        37

  Summary:        Extra Packages for Enterprise Linux RPM macros

  

  License:        GPLv2
@@ -119,6 +119,9 @@ 

  

  

  %changelog

+ * Wed Feb 08 2023 Maxwell G <gotmax@e.email> - 8-37

+ - Stop overriding macros that are now in RHEL 8.7

+ 

  * Mon Jan 23 2023 Jitka Plesnikova <jplesnik@redhat.com> - 8-36

  - Add perl-generators-epel to the buildroot

  

file modified
-23
@@ -16,29 +16,6 @@ 

  # Use the non-underscored Python macros to refer to Python in spec, etc.

  %python2 %__python2

  

- # This macro is copied here from https://git.centos.org/rpms/python-rpm-macros/pull-request/1

- # and is needed for the overrides in macros.zzz-epel-override.

- # It will be removed once it lands in RHEL.

- # https://bugzilla.redhat.com/show_bug.cgi?id=2090007

- #

- # RHEL 9+ and Fedora compatibility macro

- # Only use in macro backports, not intended to be used in spec files!

- # In the future, the %%python3_pkgversion macro has a dot, e.g. 3.9 or 3.11

- # However, in RHEL 8 at least, it does not, e.g. 38, 39

- # This is a helpful macro that determines the proper "Python version" string with dot

- # from %%python3_pkgversion without actually having Python installed.

- # For values other than 3X, it should expand to %%python3_pkgversion unchanged.

- # Examples of %%python3_pkgversion -> %%_python3_pkgversion_with_dot:

- #   3    -> 3

- #   38   -> 3.8

- #   39   -> 3.9

- #   310  -> 3.10

- #   3.12 -> 3.12

- #   4    -> 4

- #   412  -> 412

- %_python3_pkgversion_with_dot %{lua:print((rpm.expand("%python3_pkgversion"):gsub('^3(%d)', '3.%1')))}

- 

- 

  # Users can use %%python only if they redefined %%__python (e.g. to %%__python3)

  %python() %{lua:\

      __python = rpm.expand("%__python")\

file modified
-32
@@ -25,35 +25,3 @@ 

  end

  print(bin)

  }

- 

- 

- # RHEL 8's %%pytest does not work properly on non-default Python versions.

- # Backported from https://src.fedoraproject.org/rpms/python-rpm-macros/c/02536540768555dde6d675935db45df81bcab7bf?branch=rawhide

- # https://bugzilla.redhat.com/show_bug.cgi?id=2091462

- %__pytest /usr/bin/pytest%(test %{python3_pkgversion} == 3 && echo -3 || echo -%{python3_version})

- 

- # RHEL 8's %%py3_dist does not work properly on non-default Python versions.

- # This is copied here from https://git.centos.org/rpms/python-rpm-macros/pull-request/1

- # until that lands in RHEL.

- # https://bugzilla.redhat.com/show_bug.cgi?id=2090007

- 

- # Creates Python 3 dist tag(s) after converting names to canonical format

- #   Needs to first put all arguments into a list, because invoking a different

- #   macro (%py_dist_name) overwrites them

- %py3_dist() %{lua:\

-         python3_pkgversion_with_dot = rpm.expand("%_python3_pkgversion_with_dot")\

-         args = {}\

-         arg = 1\

-         while (true) do\

-                 name = rpm.expand("%{?" .. arg .. ":%{" .. arg .. "}}");\

-                 if (name == nil or name == '') then\

-                         break\

-                 end\

-                 args[arg] = name\

-                 arg = arg + 1\

-         end\

-         for arg, name in ipairs(args) do\

-                 canonical = rpm.expand("%py_dist_name " .. name);\

-                 print("python" .. python3_pkgversion_with_dot .. "dist(" .. canonical .. ") ");\

-         end\

- }

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/87ac8e6fa09d49a29557180608acb742

Oops, I'll fix that date...

rebased onto 59caa90

a year ago

Looks OK to me. Haven't tested any builds.

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/3d2e88703e32492dafcc9696abf8e467

I did some test builds and did a bit of local testing. I'll go ahead and merge this.

Thanks for the review, @churchyard!

Pull-Request has been merged by gotmax23

a year ago