summaryrefslogtreecommitdiff
path: root/scripts/macros.python.in
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-06-20 17:17:23 +0000
committerjbj <devnull@localhost>2002-06-20 17:17:23 +0000
commit110df96c22325d96559d5d66a89308c1fc708f9c (patch)
tree2b958de776db8165f751da68a303c54c0560fef0 /scripts/macros.python.in
parentbe2a538537041702617102a5a26cf00f1fcf9578 (diff)
downloadlibrpm-tizen-110df96c22325d96559d5d66a89308c1fc708f9c.tar.gz
librpm-tizen-110df96c22325d96559d5d66a89308c1fc708f9c.tar.bz2
librpm-tizen-110df96c22325d96559d5d66a89308c1fc708f9c.zip
- add translated man pages from PLD.
CVS patchset: 5514 CVS date: 2002/06/20 17:17:23
Diffstat (limited to 'scripts/macros.python.in')
-rw-r--r--scripts/macros.python.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/macros.python.in b/scripts/macros.python.in
new file mode 100644
index 000000000..0a63605f7
--- /dev/null
+++ b/scripts/macros.python.in
@@ -0,0 +1,18 @@
+# Python specific macro definitions.
+# To make use of these macros insert the following line into your spec file:
+# %include @RPMCONFIGDIR@/macros.python
+
+# python main version
+%define py_ver %(echo `python -c "import sys; print sys.version[:3]"`)
+
+# directories
+%define py_prefix %(echo `python -c "import sys; print sys.prefix"`)
+%define py_libdir %{py_prefix}/lib/python%{py_ver}
+%define py_incdir /usr/include/python%{py_ver}
+%define py_sitedir %{py_libdir}/site-packages
+%define py_dyndir %{py_libdir}/lib-dynload
+
+# pure python modules compilation
+%define py_comp python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
+
+%define py_ocomp python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"