]> git.pld-linux.org Git - packages/python-pytest.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-pytest.spec

index afe7ced66af4a38a70304221fac2e1887558d1df..06c88b72614b78b56ff6cd5473f94054406452b2 100644 (file)
@@ -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
 
This page took 0.190086 seconds and 4 git commands to generate.