blob: c7832a67ac9c9a36ddfb6e7f103a41ad2e83453a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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'):])"
|