From 52f7eb6f95835694d469ebd16a2eac2da584ceb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 11 Apr 2018 01:24:26 +0200 Subject: [PATCH] Add macro with pypy version (aka 5.10, not 2.7) --- macros.pypy | 1 + macros.pypy2 | 1 + 2 files changed, 2 insertions(+) diff --git a/macros.pypy b/macros.pypy index 910d764..7dd90df 100644 --- a/macros.pypy +++ b/macros.pypy @@ -2,3 +2,4 @@ %pypy_sitelib %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy_sitearch %(%{__pypy} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %pypy_version %(%{__pypy} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy_pypy_version %(%{__pypy} -c "import sys; sys.stdout.write('{}.{}'.format(sys.pypy_version_info.major, sys.pypy_version_info.minor))") diff --git a/macros.pypy2 b/macros.pypy2 index 9058466..fbebbe2 100644 --- a/macros.pypy2 +++ b/macros.pypy2 @@ -2,3 +2,4 @@ %pypy2_sitelib %(%{__pypy2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %pypy2_sitearch %(%{__pypy2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %pypy2_version %(%{__pypy2} -c "import sys; sys.stdout.write(sys.version[:3])") +%pypy2_pypy_version %(%{__pypy2} -c "import sys; sys.stdout.write('{}.{}'.format(sys.pypy_version_info.major, sys.pypy_version_info.minor))")