#
# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
+%bcond_without python2 # CPython 2.x module and tools
+%bcond_without python3 # CPython 3.x module and tools
%bcond_without tests # test target
%define module template
Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
Name: python-subunit
Version: 1.2.0
-Release: 1
+Release: 2
License: Apache v2.0 or BSD
Group: Libraries/Python
#Source0Download: https://pypi.python.org/simple/python-subunit/
%description
Subunit is a streaming protocol for test results.
+This package contains Python 2.x modules.
+
%description -l pl.UTF-8
Subunit to protokół strumieniowy przeznaczony do wyników testów.
+Ten pakiet zawiera moduły Pythona 2.x.
+
+%package -n subunit-python
+Summary: Python tools for subunit streaming protocol for test results
+Summary(pl.UTF-8): Pythonowe narzędzia dla protokołu strumieniowego do wyników testów subunit
+Group: Development/Tools
+Requires: subunit-python2 = %{version}-%{release}
+
+%description -n subunit-python
+Python tools for subunit streaming protocol for test results.
+
+%description -n subunit-python -l pl.UTF-8
+Pythonowe narzędzia dla protokołu strumieniowego do wyników testów
+subunit.
+
+%package -n subunit-python2
+Summary: Python 2 tools for subunit streaming protocol for test results
+Summary(pl.UTF-8): Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów subunit
+Group: Development/Tools
+Requires: python-subunit = %{version}-%{release}
+
+%description -n subunit-python2
+Python 2 tools for subunit streaming protocol for test results.
+
+%description -n subunit-python2 -l pl.UTF-8
+Narzędzia Pythona 2 dla protokołu strumieniowego do wyników testów
+subunit.
+
%package -n python3-subunit
Summary: subunit - streaming protocol for test results
Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
%description -n python3-subunit
Subunit is a streaming protocol for test results.
+This package contains Python 2.x modules.
+
%description -n python3-subunit -l pl.UTF-8
Subunit to protokół strumieniowy przeznaczony do wyników testów.
+Ten pakiet zawiera moduły Pythona 2.x.
+
+%package -n subunit-python3
+Summary: Python 3 tools for subunit streaming protocol for test results
+Summary(pl.UTF-8): Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów subunit
+Group: Development/Tools
+Requires: python3-subunit = %{version}-%{release}
+
+%description -n subunit-python3
+Python 3 tools for subunit streaming protocol for test results.
+
+%description -n subunit-python3 -l pl.UTF-8
+Narzędzia Pythona 3 dla protokołu strumieniowego do wyników testów
+subunit.
+
%prep
%setup -q
%files
%defattr(644,root,root,755)
%doc NEWS README.rst
+%{py_sitescriptdir}/subunit
+%{py_sitescriptdir}/python_subunit-%{version}-py*.egg-info
+
+%files -n subunit-python
+%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/subunit-1to2
%attr(755,root,root) %{_bindir}/subunit-2to1
%attr(755,root,root) %{_bindir}/subunit-filter
%attr(755,root,root) %{_bindir}/subunit2junitxml
%attr(755,root,root) %{_bindir}/subunit2pyunit
%attr(755,root,root) %{_bindir}/tap2subunit
+
+%files -n subunit-python2
+%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/subunit-1to2-2
%attr(755,root,root) %{_bindir}/subunit-2to1-2
%attr(755,root,root) %{_bindir}/subunit-filter-2
%attr(755,root,root) %{_bindir}/subunit2junitxml-2
%attr(755,root,root) %{_bindir}/subunit2pyunit-2
%attr(755,root,root) %{_bindir}/tap2subunit-2
-%{py_sitescriptdir}/subunit
-%{py_sitescriptdir}/python_subunit-%{version}-py*.egg-info
%endif
%if %{with python3}
%files -n python3-subunit
%defattr(644,root,root,755)
%doc NEWS README.rst
+%{py3_sitescriptdir}/subunit
+%{py3_sitescriptdir}/python_subunit-%{version}-py*.egg-info
+
+%files -n subunit-python3
+%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/subunit-1to2-3
%attr(755,root,root) %{_bindir}/subunit-2to1-3
%attr(755,root,root) %{_bindir}/subunit-filter-3
%attr(755,root,root) %{_bindir}/subunit2junitxml-3
%attr(755,root,root) %{_bindir}/subunit2pyunit-3
%attr(755,root,root) %{_bindir}/tap2subunit-3
-%{py3_sitescriptdir}/subunit
-%{py3_sitescriptdir}/python_subunit-%{version}-py*.egg-info
%endif