[packages/python-jsonschema] semi-automatic change: use py_build/py_install macros
jajcus
jajcus at pld-linux.org
Sat Nov 28 18:03:42 CET 2015
commit ffbb9fa8492320488e69da3dd5ae1aa3e7e8a9c4
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-jsonschema.spec | 23 ++++-------------------
1 file changed, 4 insertions(+), 19 deletions(-)
---
diff --git a/python-jsonschema.spec b/python-jsonschema.spec
index e042776..27e0305 100644
--- a/python-jsonschema.spec
+++ b/python-jsonschema.spec
@@ -44,24 +44,15 @@ jsonschema is JSON Schema validator currently based on
%prep
%setup -q -n %{module}-%{version}
-set -- *
-install -d py3
-cp -a "$@" py3
-find py3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
-
%build
%if %{with python3}
-cd py3
- %{__python3} setup.py build
-cd ..
+%py3_build
%endif
-%{__python} setup.py build
+%py_build
%if %{with tests}
%if %{with python3}
-cd py3
%{_bindir}/nosetests-%{py3_ver} -v
-cd ..
%endif
%{_bindir}/nosetests-%{py_ver} -v
%endif
@@ -69,17 +60,11 @@ cd ..
%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
%if %{with python2}
-%{__python} setup.py install --skip-build \
- --optimize=2 \
- --root=$RPM_BUILD_ROOT
+%py_install
%py_postclean
%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-jsonschema.git/commitdiff/ffbb9fa8492320488e69da3dd5ae1aa3e7e8a9c4
More information about the pld-cvs-commit
mailing list