From f73450ae93a39190bdcb02c4984f6af2475f827e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Fri, 25 Sep 2020 14:51:31 +0200 Subject: [PATCH] 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 --- epel-rpm-macros.spec | 6 +++++- macros.epel-rpm-macros | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/epel-rpm-macros.spec b/epel-rpm-macros.spec index c3e2871..ff1f1c2 100644 --- a/epel-rpm-macros.spec +++ b/epel-rpm-macros.spec @@ -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 - 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 - 8-17 - Add a Requires for lua-srpm-macros diff --git a/macros.epel-rpm-macros b/macros.epel-rpm-macros index 3aa950c..078906b 100644 --- a/macros.epel-rpm-macros +++ b/macros.epel-rpm-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")\