summaryrefslogtreecommitdiff
path: root/macros.in
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-08-18 09:20:45 +0300
committerPanu Matilainen <pmatilai@redhat.com>2009-08-18 09:20:45 +0300
commit3e5097c97541fa0b8f289ef3b6011bdc3b4dc002 (patch)
treed73710de2029763f37eac3d6eb51f6b3dfcc3e59 /macros.in
parent4ced96c5f2469786f5d8f9b14583f191b15a302f (diff)
downloadlibrpm-tizen-3e5097c97541fa0b8f289ef3b6011bdc3b4dc002.tar.gz
librpm-tizen-3e5097c97541fa0b8f289ef3b6011bdc3b4dc002.tar.bz2
librpm-tizen-3e5097c97541fa0b8f289ef3b6011bdc3b4dc002.zip
Add some commonly used python macros (ticket #83)
- macros to determine python version and library paths
Diffstat (limited to 'macros.in')
-rw-r--r--macros.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/macros.in b/macros.in
index 4bd81cb32..af4ac1ff4 100644
--- a/macros.in
+++ b/macros.in
@@ -1146,6 +1146,13 @@ done \
%perl_privlib %(eval "`%{__perl} -V:installprivlib`"; echo $installprivlib)
#------------------------------------------------------------------------------
+# Useful python macros for determining python version and paths
+#
+%python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
+%python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+%python_version %(%{__python} -c "import sys; print sys.version[:3]")}
+
+#------------------------------------------------------------------------------
# arch macro for all Intel i?86 compatibile processors
# (Note: This macro (and it's analogues) will probably be obsoleted when
# rpm can use regular expressions against target platforms in macro