[packages/python-subunit] - disable python3 here (no python 3.10+ support); drop python2-based subunit-python variant
qboosh
qboosh at pld-linux.org
Fri Sep 29 19:08:08 CEST 2023
commit e9ffa054c3f2de62242cca0ec37567cd9d662690
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Fri Sep 29 18:45:01 2023 +0200
- disable python3 here (no python 3.10+ support); drop python2-based subunit-python variant
python-subunit-tests.patch | 2 +-
python-subunit.spec | 12 +++---------
2 files changed, 4 insertions(+), 10 deletions(-)
---
diff --git a/python-subunit.spec b/python-subunit.spec
index a599f8b..e604d41 100644
--- a/python-subunit.spec
+++ b/python-subunit.spec
@@ -1,12 +1,13 @@
#
# 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
@@ -99,11 +100,7 @@ subunit.
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.
@@ -146,9 +143,6 @@ rm -rf $RPM_BUILD_ROOT
for f in $RPM_BUILD_ROOT%{_bindir}/* ; do
%{__mv} "$f" "${f}-2"
-%if %{without python3}
- ln -sf $(basename $f)-2 "$f"
-%endif
done
%endif
@@ -216,7 +210,6 @@ rm -rf $RPM_BUILD_ROOT
%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)
@@ -234,3 +227,4 @@ rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/subunit2junitxml
%attr(755,root,root) %{_bindir}/subunit2pyunit
%attr(755,root,root) %{_bindir}/tap2subunit
+%endif
diff --git a/python-subunit-tests.patch b/python-subunit-tests.patch
index c2b9ca3..1e10eda 100644
--- a/python-subunit-tests.patch
+++ b/python-subunit-tests.patch
@@ -40,7 +40,7 @@ Adjust some traceback quirks for (python3 or not unittest2???)
# 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"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-subunit.git/commitdiff/e9ffa054c3f2de62242cca0ec37567cd9d662690
More information about the pld-cvs-commit
mailing list