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