]> git.pld-linux.org Git - packages/rpm.git/blame - rpm-macros.python
- internal file update (for compatibility with *.mgc generated by file-4.14)
[packages/rpm.git] / rpm-macros.python
CommitLineData
c82ddf03 1# Python specific macro definitions.
2# To make use of these macros insert the following line into your spec file:
3# %include @RPMCONFIGDIR@/macros.python
4
5# python main version
6%define py_ver %(echo `python -c "import sys; print sys.version[:3]"`)
7
8# directories
9%define py_prefix %(echo `python -c "import sys; print sys.prefix"`)
10%define py_libdir %{py_prefix}/lib/python%{py_ver}
60676827 11%define py_incdir /usr/include/python%{py_ver}
c82ddf03 12%define py_sitedir %{py_libdir}/site-packages
13%define py_dyndir %{py_libdir}/lib-dynload
14
15# pure python modules compilation
16%define py_comp python -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
17
18%define py_ocomp python -O -c "import compileall; import sys; compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])"
b6902da5 19
20# Software written in Python language require Python with main version
21# unchanged
5b0f0ac9
MM
22%define pyrequires_eq() Requires: %1 >= %py_ver %1 < %(echo `python -c "import sys; import string; ver=sys.version[:3].split('.'); ver[1]=str(int(ver[1])+1); print string.join(ver, '.')"`)
23
This page took 0.079403 seconds and 4 git commands to generate.