[packages/python-docker] semi-automatic change: use py_build/py_install macros
jajcus
jajcus at pld-linux.org
Sat Nov 28 18:03:26 CET 2015
commit e1c7d18ec203f820d23ac12e23dd710d96cf0866
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-docker.spec | 21 ++++-----------------
1 file changed, 4 insertions(+), 17 deletions(-)
---
diff --git a/python-docker.spec b/python-docker.spec
index 125d5c1..ef6d62a 100644
--- a/python-docker.spec
+++ b/python-docker.spec
@@ -52,38 +52,25 @@ A Python 3 interface to Docker.
%prep
%setup -q -n docker-py-%{version}
-%if %{with python3}
-set -- *
-install -d py3
-cp -a "$@" py3
-find py3 -name '*.py' | xargs sed -i '1s|^#!python|#!%{__python3}|'
-%endif
-
%build
%if %{with python2}
-%{__python} setup.py build %{?with_tests:test}
+%py_build %{?with_tests:test}
%endif
%if %{with python3}
-cd py3
-%{__python3} setup.py build %{?with_tests:test}
+%py3_build %{?with_tests:test}
%endif
%install
rm -rf $RPM_BUILD_ROOT
%if %{with python2}
-%{__python} setup.py install --skip-build \
- --optimize=2 \
- --root=$RPM_BUILD_ROOT
+%py_install
%py_postclean
%endif
%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-docker.git/commitdiff/e1c7d18ec203f820d23ac12e23dd710d96cf0866
More information about the pld-cvs-commit
mailing list