[packages/rpm-pld-macros] - fix py3_ver macro for python 3.10, bump ver to 2.013

baggins baggins at pld-linux.org
Fri Mar 25 23:02:37 CET 2022


commit d1516807e8188eccd050e37f0a7b246480bf8d36
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Mar 25 23:01:36 2022 +0100

    - fix py3_ver macro for python 3.10, bump ver to 2.013

 macros.python       | 2 +-
 rpm-pld-macros.spec | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/rpm-pld-macros.spec b/rpm-pld-macros.spec
index adf3dee..94ec16c 100644
--- a/rpm-pld-macros.spec
+++ b/rpm-pld-macros.spec
@@ -1,4 +1,4 @@
-%define		rpm_macros_rev	2.012
+%define		rpm_macros_rev	2.013
 %define		find_lang_rev	1.40
 # split into individual X_prov_ver if there is a reason to desync
 %define		prov_ver	4.15
diff --git a/macros.python b/macros.python
index 9000ac1..2845691 100644
--- a/macros.python
+++ b/macros.python
@@ -25,7 +25,7 @@
 # Python 3.x
 # python main version
 %__python3		/usr/bin/python3
-%py3_ver		%{expand:%%global py3_ver %(%{__python3} -c "import sys; print(sys.version[:3])" 2>/dev/null || echo ERROR)}%py3_ver
+%py3_ver			%{expand:%%global py3_ver %(%{__python3} -c "from sys import version_info; print('{}.{}'.format(*version_info[:2]))" 2>/dev/null || echo ERROR)}%py3_ver
 
 # directories
 %py3_prefix		%{expand:%%global py3_prefix %(%{__python3} -c "import sys; print(sys.prefix)" 2>/dev/null || echo ERROR)}%py3_prefix
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-pld-macros.git/commitdiff/d1516807e8188eccd050e37f0a7b246480bf8d36



More information about the pld-cvs-commit mailing list