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
%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