Add %python3_platform_triplet and %python3_ext_suffix

Also add %python_platform_triplet and %python_ext_suffix.

https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
epel9
Miro Hrončok 4 years ago
parent d08dbfe8a0
commit f73450ae93

@ -1,6 +1,6 @@
Name: epel-rpm-macros
Version: 8
Release: 17
Release: 18
Summary: Extra Packages for Enterprise Linux RPM macros
Group: System Environment/Base
@ -85,6 +85,10 @@ install -Dpm 755 %{SOURCE24} \
%changelog
* Fri Sep 25 2020 Miro Hrončok <mhroncok@redhat.com> - 8-18
- Add %%python3_platform_triplet and %%python3_ext_suffix
- https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
* Tue Sep 8 2020 Michel Alexandre Salim <salimma@fedoraproject.org> - 8-17
- Add a Requires for lua-srpm-macros

@ -25,6 +25,12 @@
%py2_shebang_fix %{expand:/usr/bin/pathfix.py -pni "%{__python2} %{py2_shbang_opts}"}
%py3_shebang_fix %{expand:/usr/bin/pathfix.py -pni "%{__python3} %{py3_shbang_opts}"}
# https://fedoraproject.org/wiki/Changes/Python_Upstream_Architecture_Names
%python_platform_triplet %(%{__python} -Esc "import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))")
%python_ext_suffix %(%{__python} -Esc "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))")
%python3_platform_triplet %(%{__python3} -Ic "import sysconfig; print(sysconfig.get_config_var('MULTIARCH'))")
%python3_ext_suffix %(%{__python3} -Ic "import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX'))")
# Users can use %%python only if they redefined %%__python (e.g. to %%__python3)
%python() %{lua:\
__python = rpm.expand("%__python")\

Loading…
Cancel
Save