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

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


commit 165453a9aaa940e91aa30140d1ff3144e2a076bf
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-dtopt.spec | 25 ++++---------------------
 1 file changed, 4 insertions(+), 21 deletions(-)
---
diff --git a/python-dtopt.spec b/python-dtopt.spec
index b6ae1df..f412948 100644
--- a/python-dtopt.spec
+++ b/python-dtopt.spec
@@ -52,38 +52,21 @@ dtopt import ELLIPSIS
 # Remove bundled egg info if it exists.
 rm -r *.egg-info
 
-%if %{with python3}
-rm -rf py3
-set -- *
-install -d py3
-cp -a "$@" py3
-# There is a print statement in the test that is not python3 compatible.
-rm py3/dtopt/tests.py*
-%endif
-
 %build
-%{__python} setup.py build
+%py_build
 
 %if %{with python3}
-cd py3
-%{__python3} setup.py build
+%py3_build
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
-	--skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+%py_install
 
 %py_postclean
 
 %if %{with python3}
-cd py3
-%{__python3} setup.py install \
-	--skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+%py3_install
 %endif
 
 %clean
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-dtopt.git/commitdiff/165453a9aaa940e91aa30140d1ff3144e2a076bf



More information about the pld-cvs-commit mailing list