]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- macros which simplify build rpm packages with python stuff
authorwrobell <wrobell@pld-linux.org>
Sun, 11 Nov 2001 16:24:55 +0000 (16:24 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    rpm-macros.python -> 1.1
    rpm-python-macros.patch -> 1.1

rpm-macros.python [new file with mode: 0644]
rpm-python-macros.patch [new file with mode: 0644]

diff --git a/rpm-macros.python b/rpm-macros.python
new file mode 100644 (file)
index 0000000..4003ae9
--- /dev/null
@@ -0,0 +1,17 @@
+# 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_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'):])"
diff --git a/rpm-python-macros.patch b/rpm-python-macros.patch
new file mode 100644 (file)
index 0000000..9c9064c
--- /dev/null
@@ -0,0 +1,10 @@
+--- configure.in       Sun Nov 11 16:16:04 2001
++++ configure.in.new   Sun Nov 11 16:14:58 2001
+@@ -1087,6 +1087,7 @@
+ AC_CONFIG_SUBDIRS(popt)
+ AC_OUTPUT([Doxyfile Makefile rpmrc macros platform rpmpopt rpm.spec scripts/brp-redhat
+       macros.perl scripts/perl.req scripts/perl.prov
++    macros.python
+       rpmio/Makefile lib/Makefile build/Makefile tools/Makefile
+       scripts/Makefile
+       tests/Makefile tests/rpmrc tests/macros tests/hello-test/Makefile
This page took 0.036041 seconds and 4 git commands to generate.