From b198ed21373ab31fe138835420ca6df3a818b13b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Tue, 5 Sep 2017 19:54:34 +0200 Subject: [PATCH] use modern packaging macro Signed-off-by: Igor Gnatenko --- python-kdcproxy.spec | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/python-kdcproxy.spec b/python-kdcproxy.spec index b96b135..cb38be0 100644 --- a/python-kdcproxy.spec +++ b/python-kdcproxy.spec @@ -70,16 +70,15 @@ minimal configuration. %patch0 -p1 %build -%{__python} setup.py build +%py2_build +%if 0%{?rhel} == 0 +%py3_build +%endif %install -rm -rf $RPM_BUILD_ROOT -%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT -find $RPM_BUILD_ROOT%{python_sitelib}/%{realname}/ -name '*.py' -exec chmod 755 '{}' \; - +%py2_install %if 0%{?rhel} == 0 -%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT -find $RPM_BUILD_ROOT%{python3_sitelib}/%{realname}/ -name '*.py' -exec chmod 755 '{}' \; +%py3_install %endif %check