aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macros.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/macros.in b/macros.in
index d676ad9..f583d62 100644
--- a/macros.in
+++ b/macros.in
@@ -613,8 +613,16 @@ Internationalization and locale data for %{?1:%{1}}%{?!1:%{name}}\
%%files -n %{?1:%{1}}%{?!1:%{name}}-i18n %{?-f:%{-f}}%{?!-f:-f %{?1:%{1}}%{?!1:%{name}}.lang}\
%{nil}
+
#------------------------------------------------------------------------------
-# Python specific macro definitions (originally from PLD).
+# Python specific macros
+
+# (from rpm 4.4.6)
+%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
+%python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
+%python_version %(%{__python} -c "import sys; print(sys.version[0:3])")
+
+# More Python specific macro definitions (originally from PLD).
#
%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)