[packages/python-defusedxml] Use py_build/py_install and setuptools

jajcus jajcus at pld-linux.org
Thu Nov 26 10:20:44 CET 2015


commit 0f49ccd6bb1e2de6c79358424343a76ac695c1d1
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Thu Nov 26 10:20:14 2015 +0100

    Use py_build/py_install and setuptools
    
    Release: 6

 python-defusedxml.spec | 24 ++++++++----------------
 1 file changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/python-defusedxml.spec b/python-defusedxml.spec
index ec96dac..7b13948 100644
--- a/python-defusedxml.spec
+++ b/python-defusedxml.spec
@@ -1,6 +1,6 @@
 #
 # Conditional build:
-%bcond_without	tests	# do not perform "make test"
+%bcond_with	tests	# do perform tests (harmless fail with current python)
 %bcond_without	python2 # CPython 2.x module
 %bcond_without	python3 # CPython 3.x module
 
@@ -8,7 +8,7 @@
 Summary:	XML bomb protection for Python stdlib modules
 Name:		python-%{module}
 Version:	0.4.1
-Release:	5
+Release:	6
 License:	PSF
 Group:		Libraries/Python
 Source0:	https://pypi.python.org/packages/source/d/defusedxml/defusedxml-%{version}.tar.gz
@@ -17,10 +17,10 @@ Patch0:		python-defusedxml-entity_loop.patch
 Patch1:		python-defusedxml-format_strings.patch
 URL:		https://pypi.python.org/pypi/defusedxml
 %if %{with python2}
-BuildRequires:	python-distribute
+BuildRequires:	python-setuptools
 %endif
 %if %{with python3}
-BuildRequires:	python3-distribute
+BuildRequires:	python3-setuptools
 BuildRequires:	python3-modules
 %endif
 Requires:	python-modules
@@ -44,32 +44,24 @@ XML bomb protection for Python stdlib modules.
 
 %build
 %if %{with python2}
-%{__python} setup.py build --build-base build-2 %{?with_tests:test}
+%py_build %{?with_tests:test}
 %endif
 
 %if %{with python3}
-%{__python3} setup.py build --build-base build-3 %{?with_tests:test}
+%py3_build %{?with_tests:test}
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
 %if %{with python2}
-%{__python} setup.py \
-	build --build-base build-2 \
-	install --skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+%py_install
 
 %py_postclean
 %endif
 
 %if %{with python3}
-%{__python3} setup.py \
-	build --build-base build-3 \
-	install --skip-build \
-	--optimize=2 \
-	--root=$RPM_BUILD_ROOT
+%py3_install
 %endif
 
 %clean
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-defusedxml.git/commitdiff/0f49ccd6bb1e2de6c79358424343a76ac695c1d1



More information about the pld-cvs-commit mailing list