From c5af50ed1a044a5def590a8e96116da4c2b352c9 Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Mon, 23 Jul 2018 13:51:55 +0200 Subject: [PATCH] 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 ^~~~~~~~~~ compilation terminated. --- libsemanage.spec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libsemanage.spec b/libsemanage.spec index d56edc3..4f5fcbc 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -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 \