# Before the test module imports to avoid circularity.
# For testing: different pythons have different str() implementations.
-+tb_prelude = "Traceback (most recent call last):\n" if ((sys.version_info[0] < 3) or (sys.version_info[0:2] >= [3, 8])) else ""
++tb_prelude = "Traceback (most recent call last):\n" if ((sys.version_info[0] < 3) or (sys.version_info[0:2] >= (3, 8))) else ""
_remote_exception_repr = "testtools.testresult.real._StringException"
-_remote_exception_str = "Traceback (most recent call last):\ntesttools.testresult.real._StringException"
-_remote_exception_str_chunked = "57\r\n" + _remote_exception_str + ": boo qux\n0\r\n"
#
# Conditional build:
%bcond_without python2 # CPython 2.x module and tools
-%bcond_without python3 # CPython 3.x module and tools
+%bcond_with python3 # CPython 3.x module and tools (built from python3-subunit.spec)
%bcond_without tests # unit tests
Summary: subunit - streaming protocol for test results
Summary(pl.UTF-8): subunit - protokół strumieniowy do wyników testów
Name: python-subunit
+# keep 1.4.0 here for python2 support
Version: 1.4.0
Release: 4
License: Apache v2.0 or BSD
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
-%if %{with python3}
Requires: subunit-python3 = %{version}-%{release}
-%else
-Requires: subunit-python2 = %{version}-%{release}
-%endif
%description -n subunit-python
Python tools for subunit streaming protocol for test results.
for f in $RPM_BUILD_ROOT%{_bindir}/* ; do
%{__mv} "$f" "${f}-2"
-%if %{without python3}
- ln -sf $(basename $f)-2 "$f"
-%endif
done
%endif
%attr(755,root,root) %{_bindir}/subunit2junitxml-3
%attr(755,root,root) %{_bindir}/subunit2pyunit-3
%attr(755,root,root) %{_bindir}/tap2subunit-3
-%endif
%files -n subunit-python
%defattr(644,root,root,755)
%attr(755,root,root) %{_bindir}/subunit2junitxml
%attr(755,root,root) %{_bindir}/subunit2pyunit
%attr(755,root,root) %{_bindir}/tap2subunit
+%endif