aboutsummaryrefslogtreecommitdiffstats
path: root/macros.in
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-12-17 16:42:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-12-17 16:42:17 +0000
commit2ac128eb0fba45d4cbd02374b5c7b3a57055ee26 (patch)
tree4c5763c4761584a5adf572c83daab9b871dc4493 /macros.in
parent01feda44d8978d93862e4706259939868f5fd452 (diff)
downloadrpm-setup-2ac128eb0fba45d4cbd02374b5c7b3a57055ee26.tar
rpm-setup-2ac128eb0fba45d4cbd02374b5c7b3a57055ee26.tar.gz
rpm-setup-2ac128eb0fba45d4cbd02374b5c7b3a57055ee26.tar.bz2
rpm-setup-2ac128eb0fba45d4cbd02374b5c7b3a57055ee26.tar.xz
rpm-setup-2ac128eb0fba45d4cbd02374b5c7b3a57055ee26.zip
add rpm 4.4.6 python macros for compatibility
(even if it overlaps with py_* macros)
Diffstat (limited to 'macros.in')
-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)