]> git.pld-linux.org Git - packages/python-docker.git/commitdiff
semi-automatic change: use py_build/py_install macros
authorJacek Konieczny <jajcus@jajcus.net>
Sat, 28 Nov 2015 17:02:19 +0000 (18:02 +0100)
committerJacek Konieczny <jajcus@jajcus.net>
Sat, 28 Nov 2015 17:02:19 +0000 (18:02 +0100)
python-docker.spec

index 125d5c10261a634f49e93f2e8ea13576a52faf34..ef6d62add688ca228c05893009a0bcee91a4e585 100644 (file)
@@ -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
This page took 0.191392 seconds and 4 git commands to generate.