[packages/python-sleekxmpp] semi-automatic change: use py_build/py_install macros

jajcus jajcus at pld-linux.org
Sat Nov 28 18:03:53 CET 2015


commit d258c2533be281b8bd66ba492b6802fce50af952
Author: Jacek Konieczny <jajcus at jajcus.net>
Date:   Sat Nov 28 18:02:19 2015 +0100

    semi-automatic change: use py_build/py_install macros

 python-sleekxmpp.spec | 27 ++++-----------------------
 1 file changed, 4 insertions(+), 23 deletions(-)
---
diff --git a/python-sleekxmpp.spec b/python-sleekxmpp.spec
index e0b3827..0898aaf 100644
--- a/python-sleekxmpp.spec
+++ b/python-sleekxmpp.spec
@@ -58,22 +58,10 @@ Dokumentacja API %{module}.
 
 %prep
 %setup -q -n %{module}-%{version}
-set -- *
-install -d py3
-cp -a "$@" py3
 
 %build
-%{__python} setup.py build
-cd py3
-%{__python3} setup.py build
-cd ..
-
-%if %{with tests}
-%{__python} testall.py
-cd py3
-%{__python3} testall.py
-cd ..
-%endif
+%py_build %{?with_tests:test}
+%py3_build %{?with_tests:test}
 
 %if %{with apidocs}
 %{__make} -C docs html
@@ -83,10 +71,7 @@ cd ..
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
-	--optimize=2 \
-	--skip-build \
-	--root $RPM_BUILD_ROOT
+%py_install
 
 %{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/sleekxmpp/test
 %py_postclean
@@ -94,11 +79,7 @@ rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/python-%{module}-%{version}
 
-cd py3
-%{__python3} setup.py install \
-	--optimize=2 \
-	--skip-build \
-	--root $RPM_BUILD_ROOT
+%py3_install
 
 %{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/sleekxmpp/test
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-sleekxmpp.git/commitdiff/d258c2533be281b8bd66ba492b6802fce50af952



More information about the pld-cvs-commit mailing list