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

jajcus jajcus at pld-linux.org
Sat Nov 28 18:04:05 CET 2015


commit abb094e4c822987a1291acc5c388fe07e837fed9
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-webtest.spec | 30 ++++++------------------------
 1 file changed, 6 insertions(+), 24 deletions(-)
---
diff --git a/python-webtest.spec b/python-webtest.spec
index fa796b7..44a4200 100644
--- a/python-webtest.spec
+++ b/python-webtest.spec
@@ -56,46 +56,28 @@ with any WSGI-compatible framework.
 # Remove bundled egg info if it exists.
 rm -r *.egg-info
 
-%if %{with python3}
-rm -rf py3
-set -- *
-install -d py3
-cp -a "$@" py3
-%endif
-
 %build
-%{__python} setup.py build
+%py_build
 
 %if %{with python3}
-cd py3
-%{__python3} setup.py build
-cd ..
+%py3_build
 %endif
 
 %if %{with tests}
-PYTHONPATH=$(pwd) %{__python} setup.py test
+PYTHONPATH=build-2/lib %{__python} setup.py test
 
 %if %{with python3}
-cd py3
-#PYTHONPATH=$(pwd) %{__python3} setup.py test
+#PYTHONPATH=build-3/lib %{__python3} setup.py test
 %endif
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
-cd py3
-%{__python3} setup.py install \
-	--skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
-cd ..
+%py3_install
 %endif
 
-%{__python} setup.py install \
-	--skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+%py_install
 
 %clean
 rm -rf $RPM_BUILD_ROOT
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-webtest.git/commitdiff/abb094e4c822987a1291acc5c388fe07e837fed9



More information about the pld-cvs-commit mailing list