Use %{__python2} macro to build python2 packages

${__python} and /usr/bin/python are not available anymore.

Fixes:
make[1]: /usr/bin/python: Command not found
Please specify at least one package name on the command line.
cc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=zEC12 -mtune=z13 -fasynchronous-unwind-tables -fstack-clash-protection -I../include -D_GNU_SOURCE -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow -Wno-unused-parameter  -fPIC -DSHARED -c -o semanageswig_wrap.lo semanageswig_wrap.c
semanageswig_wrap.c:149:11: fatal error: Python.h: No such file or directory
 # include <Python.h>
           ^~~~~~~~~~
compilation terminated.
This commit is contained in:
Petr Lautrbach 2018-07-23 13:51:55 +02:00
parent fd362e344c
commit c5af50ed1a
1 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ make CFLAGS="%{optflags}" swigify
make CFLAGS="%{optflags}" LIBDIR="%{_libdir}" SHLIBDIR="%{_lib}" all
BuildPythonWrapper \
%{__python}
%{__python2}
BuildPythonWrapper \
%{__python3}
@ -133,7 +133,7 @@ mkdir -p ${RPM_BUILD_ROOT}%{_sharedstatedir}/selinux/tmp
make DESTDIR="${RPM_BUILD_ROOT}" LIBDIR="%{_libdir}" SHLIBDIR="%{_libdir}" install
InstallPythonWrapper \
%{__python} \
%{__python2} \
.so
InstallPythonWrapper \