Stop overriding macros that are now in RHEL 8.7

Relates: d6955c24a4?branch=c8
epel8
Maxwell G 2 years ago
parent 62c9018653
commit 59caa90b5f
No known key found for this signature in database
GPG Key ID: F79E4E25E8C661F8

@ -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 @@ install -Dpm 644 %{SOURCE151} \
%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

@ -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")\

@ -25,35 +25,3 @@ else
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\
}

Loading…
Cancel
Save