File macros.python2 of Package python (Revision eab3ec8d293dfeaaf9f14950b7716252)
Currently displaying revision eab3ec8d293dfeaaf9f14950b7716252 , Show latest
22
1
# legacy macros. commented but kept for the sake of possible recovery of their values
2
%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
3
%py_libdir %{py_prefix}/%{_lib}/python%{py_ver}
4
%py_incdir %{py_prefix}/include/python%{py_ver}
5
%py_sitedir %{py_libdir}/site-packages
6
7
# these might be still in use somewhere
8
%py_compile(O) \
9
find %1 -name '*.pyc' -exec rm -f {} \\; \
10
python2 -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
11
%{-O: \
12
find %1 -name '*.pyo' -exec rm -f {} \\; \
13
python2 -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
14
}
15
%py_requires(d) \
16
BuildRequires: /usr/bin/python %{-d:python-devel} \
17
PreReq: python = %{py_ver}
18
19
# new-style macros relying on python-rpm-macros package
20
%have_python2 1
21
%python2_package_prefix python2
22