[packages/python-pytest] semi-automatic change: use py_build/py_install macros
jajcus
jajcus at pld-linux.org
Sat Nov 28 18:03:50 CET 2015
commit ac22139b0ffc62dd8d5a6e5dba9faaf78a0eb9a4
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-pytest.spec | 28 ++++++++--------------------
1 file changed, 8 insertions(+), 20 deletions(-)
---
diff --git a/python-pytest.spec b/python-pytest.spec
index afe7ced..06c88b7 100644
--- a/python-pytest.spec
+++ b/python-pytest.spec
@@ -58,20 +58,11 @@ Pythona.
%prep
%setup -q -n %{module}-%{version}
-%if %{with python3}
-rm -rf build-3
-set -- *
-install -d build-3
-cp -a "$@" build-3
-find build-3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
-%endif
-
%build
-%{__python} setup.py build
+%py_build
%if %{with python3}
-%{__python3} setup.py \
- build -b build-3
+%py3_build
%endif
%if %{with doc}
@@ -87,15 +78,12 @@ done
%install
rm -rf $RPM_BUILD_ROOT
-%{__python3} -- setup.py \
- build -b build-3 \
- install \
- --root=$RPM_BUILD_ROOT \
- --optimize=2
-
-%{__python} setup.py install \
- --optimize=2 \
- --root=$RPM_BUILD_ROOT
+
+%if %{with python3}
+%py3_install
+%endif
+
+%py_install
%py_postclean
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-pytest.git/commitdiff/ac22139b0ffc62dd8d5a6e5dba9faaf78a0eb9a4
More information about the pld-cvs-commit
mailing list