3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module unittest-xml-reporting
7 Summary: Unittest-based test runner with Ant/JUnit like XML reporting
12 Group: Libraries/Python
13 Source0: https://pypi.python.org/packages/77/27/b4442a041de8fc5366e3d0c82fa2919cba76d6fc7888635540828c740633/%{module}-%{version}.tar.gz
14 # Source0-md5: 9284cbfccc56b4347493f134e780fa3c
15 URL: http://github.com/danielfm/unittest-xml-reporting/tree/master/
16 BuildRequires: rpmbuild(macros) >= 1.714
18 BuildRequires: python-modules >= 1:2.7
19 BuildRequires: python-setuptools
22 BuildRequires: python3-modules >= 1:3.3
23 BuildRequires: python3-setuptools
25 BuildRequires: rpm-pythonprov
26 Requires: python-modules >= 1:2.7
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 unittest-xml-reporting is a unittest test runner that can save test
32 results to XML files that can be consumed by a wide range of tools,
33 such as build systems, IDEs and continuous integration servers.
35 %package -n python3-%{module}
36 Summary: Unittest-based test runner with Ant/JUnit like XML reporting
37 Group: Libraries/Python
38 Requires: python3-modules
40 %description -n python3-%{module}
41 unittest-xml-reporting is a unittest test runner that can save test
42 results to XML files that can be consumed by a wide range of tools,
43 such as build systems, IDEs and continuous integration servers.
46 %setup -q -n %{module}-%{version}
50 %py_build %{?with_tests:test}
54 %py3_build %{?with_tests:test}
58 rm -rf $RPM_BUILD_ROOT
71 rm -rf $RPM_BUILD_ROOT
74 %defattr(644,root,root,755)
76 %{py_sitescriptdir}/unittest_xml_report*egg-info
77 %{py_sitescriptdir}/xmlrunner
79 %files -n python3-%{module}
80 %defattr(644,root,root,755)
82 %{py3_sitescriptdir}/unittest_xml_report*egg-info
83 %{py3_sitescriptdir}/xmlrunner