Switch %%__python3 to /usr/libexec/system-python

This commit is contained in:
Michal Cyprian 2017-02-17 14:48:08 +01:00
parent 063c3984a9
commit d019d2fd4d
2 changed files with 9 additions and 5 deletions

View File

@ -1,4 +1,5 @@
%__python3 /usr/bin/python3 %__python3 /usr/libexec/system-python
%__python3_bin /usr/bin/python3
%python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") %python3_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")
%python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))") %python3_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")
%python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])") %python3_version %(%{__python3} -c "import sys; sys.stdout.write(sys.version[:3])")
@ -10,7 +11,7 @@
# Use the slashes after expand so that the command starts on the same line as # Use the slashes after expand so that the command starts on the same line as
# the macro # the macro
%py3_build() %{expand:\\\ %py3_build() %{expand:\\\
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3} %{py3_shbang_opts}" %{?*} CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} build --executable="%{__python3_bin} %{py3_shbang_opts}" %{?*}
sleep 1 sleep 1
} }
@ -25,7 +26,7 @@
} }
%py3_install() %{expand:\\\ %py3_install() %{expand:\\\
CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*} CFLAGS="%{optflags}" %{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} --executable="%{__python3_bin} %{py3_shbang_opts}" %{?*}
} }
%py3_install_egg() %{expand:\\\ %py3_install_egg() %{expand:\\\
@ -34,5 +35,5 @@
} }
%py3_install_wheel() %{expand:\\\ %py3_install_wheel() %{expand:\\\
pip%{python3_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps pip%{python3_version} install -I dist/%{1} --root %{buildroot} --strip-file-prefix %{buildroot} --prefix %{_prefix} --no-deps
} }

View File

@ -1,6 +1,6 @@
Name: python-rpm-macros Name: python-rpm-macros
Version: 3 Version: 3
Release: 18%{?dist} Release: 19%{?dist}
Summary: The unversioned Python RPM macros Summary: The unversioned Python RPM macros
License: MIT License: MIT
@ -69,6 +69,9 @@ install -m 644 %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} \
%changelog %changelog
* Fri Feb 17 2017 Michal Cyprian <mcyprian@redhat.com> - 3-19
- Switch %%__python3 to /usr/libexec/system-python
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3-18 * Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3-18
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild