use modern packaging macro

Signed-off-by: Igor Gnatenko <ignatenko@redhat.com>
This commit is contained in:
Igor Gnatenko 2017-09-05 19:54:34 +02:00
parent 8d5f0305e1
commit b198ed2137

View File

@ -70,16 +70,15 @@ minimal configuration.
%patch0 -p1 %patch0 -p1
%build %build
%{__python} setup.py build %py2_build
%if 0%{?rhel} == 0
%py3_build
%endif
%install %install
rm -rf $RPM_BUILD_ROOT %py2_install
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
find $RPM_BUILD_ROOT%{python_sitelib}/%{realname}/ -name '*.py' -exec chmod 755 '{}' \;
%if 0%{?rhel} == 0 %if 0%{?rhel} == 0
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT %py3_install
find $RPM_BUILD_ROOT%{python3_sitelib}/%{realname}/ -name '*.py' -exec chmod 755 '{}' \;
%endif %endif
%check %check