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
6 %define py_ver %(echo `python -c "import sys; sys.stdout.write(sys.version[:3])"`)
9 %define py_prefix %(echo `python -c "import sys; sys.stdout.write(sys.prefix)"`)
10 %define py_libdir %{py_prefix}/lib/python%{py_ver}
11 %define py_incdir /usr/include/python%{py_ver}
12 %define py_sitedir %{py_libdir}/site-packages
13 %define py_dyndir %{py_libdir}/lib-dynload
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'):])"
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'):])"