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

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


commit 72a3bb8d8121c1f575978a8022b5b9c8fb5d6fef
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-websocket-client.spec | 23 ++++-------------------
 1 file changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/python-websocket-client.spec b/python-websocket-client.spec
index 00044c6..72006e8 100644
--- a/python-websocket-client.spec
+++ b/python-websocket-client.spec
@@ -50,30 +50,19 @@ python-websocket-client supports only hybi-13.
 %prep
 %setup -q -n websocket-client-%{version}
 
-%if %{with python3}
-set -- *
-install -d py3
-cp -a "$@" py3
-%endif
-
 %build
 %if %{with python3}
-cd py3
-%{__python3} setup.py build %{?with_tests:test}
-cd ..
+%py3_build %{?with_tests:test}
 %endif
 
 %if %{with python2}
-%{__python} setup.py build %{?with_tests:test}
+%py_build %{?with_tests:test}
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 %if %{with python3}
-cd py3
-%{__python3} setup.py install --skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+%py3_install
 
 mv $RPM_BUILD_ROOT%{_bindir}/{wsdump.py,wsdump-%{py3_ver}}
 
@@ -84,14 +73,10 @@ ln -s %{_sysconfdir}/pki/tls/cert.pem $RPM_BUILD_ROOT%{py3_sitescriptdir}/websoc
 
 # remove tests that got installed into the buildroot
 rm -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/tests
-
-cd ..
 %endif
 
 %if %{with python2}
-%{__python} setup.py install --skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+%py_install
 
 %py_postclean
 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-websocket-client.git/commitdiff/72a3bb8d8121c1f575978a8022b5b9c8fb5d6fef



More information about the pld-cvs-commit mailing list