2019-09-30 12:35:43 +00:00
|
|
|
# use the underscored macros to redefine the behavior of %%python2_version etc.
|
2016-09-15 20:40:12 +00:00
|
|
|
%__python2 /usr/bin/python2.6
|
2019-09-30 12:35:43 +00:00
|
|
|
|
|
|
|
# use the non-underscored macros to refer to Python in spec, etc.
|
|
|
|
%python2 %__python2
|
|
|
|
|
2016-01-12 23:52:28 +00:00
|
|
|
%python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
|
|
|
|
%python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
|
2016-09-15 20:40:12 +00:00
|
|
|
%python2_version %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3])")
|
|
|
|
%python2_version_nodots %(%{__python2} -c "import sys; sys.stdout.write(sys.version[:3:2])")
|
2016-01-12 23:52:28 +00:00
|
|
|
|
|
|
|
%py2_shbang_opts -s
|
|
|
|
|
|
|
|
%py2_build() %{expand:\
|
2016-05-12 18:28:05 +00:00
|
|
|
CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} build --executable="%{__python2} %{py2_shbang_opts}" %{?1};\
|
|
|
|
sleep 1\
|
2016-01-12 23:52:28 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
%py2_install() %{expand:\
|
|
|
|
CFLAGS="%{optflags}" %{__python2} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?1}\
|
|
|
|
}
|