[packages/python-unittest-xml-reporting] Version: 2.1.0, python3 build

jajcus jajcus at pld-linux.org
Wed Oct 26 11:20:33 CEST 2016


commit b243c8b0d39957cc82b3da5a14008b6fffcd09cf
Author: Jacek Konieczny <j.konieczny at eggsoft.pl>
Date:   Wed Oct 26 11:16:55 2016 +0200

    Version: 2.1.0, python3 build

 python-unittest-xml-reporting.spec | 64 +++++++++++++++++++++++++++++---------
 1 file changed, 49 insertions(+), 15 deletions(-)
---
diff --git a/python-unittest-xml-reporting.spec b/python-unittest-xml-reporting.spec
index 88f037b..344d968 100644
--- a/python-unittest-xml-reporting.spec
+++ b/python-unittest-xml-reporting.spec
@@ -1,20 +1,29 @@
+#
+# Conditional build:
+%bcond_without	python2 # CPython 2.x module
+%bcond_without	python3 # CPython 3.x module
 
 %define 	module	unittest-xml-reporting
-
 Summary:	Unittest-based test runner with Ant/JUnit like XML reporting
 Name:		python-%{module}
-Version:	1.3.1
+Version:	2.1.0
 Release:	1
-License:	LGPL
+License:	BSD
 Group:		Libraries/Python
-Source0:	http://pypi.python.org/packages/source/u/unittest-xml-reporting/%{module}-%{version}.tar.gz
-# Source0-md5:	ddd72668d2fc4707e566b11b31b5b7a2
+Source0:	https://pypi.python.org/packages/77/27/b4442a041de8fc5366e3d0c82fa2919cba76d6fc7888635540828c740633/%{module}-%{version}.tar.gz
+# Source0-md5:	9284cbfccc56b4347493f134e780fa3c
 URL:		http://github.com/danielfm/unittest-xml-reporting/tree/master/
-BuildRequires:	rpmbuild(macros) >= 1.710
-BuildRequires:	python-devel >= 1:2.3
-BuildRequires:	python-modules
+BuildRequires:	rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires:	python-modules >= 1:2.7
+BuildRequires:	python-setuptools
+%endif
+%if %{with python2}
+BuildRequires:	python3-modules >= 1:3.3
+BuildRequires:	python3-setuptools
+%endif
 BuildRequires:	rpm-pythonprov
-Requires:	python >= 2.3
+Requires:	python-modules >= 1:2.7
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -23,21 +32,40 @@ unittest-xml-reporting is a unittest test runner that can save test
 results to XML files that can be consumed by a wide range of tools,
 such as build systems, IDEs and continuous integration servers.
 
+%package -n python3-%{module}
+Summary:	Unittest-based test runner with Ant/JUnit like XML reporting
+Group:		Libraries/Python
+Requires:	python3-modules
+
+%description -n python3-%{module}
+unittest-xml-reporting is a unittest test runner that can save test
+results to XML files that can be consumed by a wide range of tools,
+such as build systems, IDEs and continuous integration servers.
+
 %prep
 %setup -q -n %{module}-%{version}
 
 %build
-python setup.py build_ext
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{py_sitescriptdir}
 
-%py_install \
-	--install-lib=%{py_sitescriptdir} \
-	--optimize=2
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
 
-find $RPM_BUILD_ROOT%{py_sitescriptdir} -name \*.py -exec rm {} \;
+%if %{with python3}
+%py3_install
+%endif
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -47,3 +75,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc PKG-INFO
 %{py_sitescriptdir}/unittest_xml_report*egg-info
 %{py_sitescriptdir}/xmlrunner
+
+%files -n python3-%{module}
+%defattr(644,root,root,755)
+%doc PKG-INFO
+%{py3_sitescriptdir}/unittest_xml_report*egg-info
+%{py3_sitescriptdir}/xmlrunner
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python-unittest-xml-reporting.git/commitdiff/b243c8b0d39957cc82b3da5a14008b6fffcd09cf



More information about the pld-cvs-commit mailing list