[packages/python3-stestr] - python-stestr.spec updated to 4.2.0 for python 3.8+

qboosh qboosh at pld-linux.org
Sat Nov 1 19:29:44 CET 2025


commit 91ff72ce1b8a20b8e0b6b51102cde1a6c0e27342
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Nov 1 19:29:44 2025 +0100

    - python-stestr.spec updated to 4.2.0 for python 3.8+

 python-stestr.spec         | 213 ---------------------------------------------
 python3-stestr.spec        | 116 ++++++++++++++++++++++++
 stestr-mock.patch          | 115 ------------------------
 stestr-no-py3-future.patch |  28 ------
 4 files changed, 116 insertions(+), 356 deletions(-)
---
diff --git a/python-stestr.spec b/python-stestr.spec
deleted file mode 100644
index 3a89252..0000000
--- a/python-stestr.spec
+++ /dev/null
@@ -1,213 +0,0 @@
-#
-# Conditional build:
-%bcond_without	doc	# Sphinx documentation
-%bcond_with	tests	# unit tests (some failing)
-%bcond_without	python2 # CPython 2.x module
-%bcond_without	python3 # CPython 3.x module
-
-Summary:	A parallel Python test runner built around subunit
-Summary(pl.UTF-8):	Zrównoleglone narzędzie do uruchamiania testów w Pythonie zbudowane wokół subunit
-Name:		python-stestr
-# keep 2.x here for python2 support
-Version:	2.6.0
-Release:	3
-License:	Apache v2.0
-Group:		Libraries/Python
-#Source0Download: https://pypi.org/simple/stestr/
-Source0:	https://files.pythonhosted.org/packages/source/s/stestr/stestr-%{version}.tar.gz
-# Source0-md5:	1ed94a3b9990871ddc863d8651f58cf8
-Patch0:		stestr-no-py3-future.patch
-Patch1:		stestr-mock.patch
-URL:		https://pypi.org/project/stestr/
-%if %{with python2}
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-pbr >= 4.0.4
-BuildRequires:	python-setuptools
-%if %{with tests}
-BuildRequires:	python-PyYAML >= 3.10.0
-BuildRequires:	python-cliff >= 2.8.0
-BuildRequires:	python-ddt >= 1.0.1
-BuildRequires:	python-fixtures >= 3.0.0
-BuildRequires:	python-mock >= 2.0
-BuildRequires:	python-six >= 1.10.0
-BuildRequires:	python-subunit >= 1.3.0
-BuildRequires:	python-subunit2sql >= 1.8.0
-BuildRequires:	python-testtools >= 2.2.0
-BuildRequires:	python-voluptuous >= 0.8.9
-%endif
-%endif
-%if %{with python3}
-BuildRequires:	python3-modules >= 1:3.5
-BuildRequires:	python3-pbr >= 4.0.4
-BuildRequires:	python3-setuptools
-%if %{with tests}
-BuildRequires:	python3-PyYAML >= 3.10.0
-BuildRequires:	python3-cliff >= 2.8.0
-BuildRequires:	python3-ddt >= 1.0.1
-BuildRequires:	python3-fixtures >= 3.0.0
-BuildRequires:	python3-six >= 1.10.0
-BuildRequires:	python3-subunit >= 1.3.0
-BuildRequires:	python3-subunit2sql >= 1.8.0
-BuildRequires:	python3-testtools >= 2.2.0
-BuildRequires:	python3-voluptuous >= 0.8.9
-%endif
-%endif
-%if %{with doc}
-BuildRequires:	python-cliff >= 2.8.0
-BuildRequires:	sphinx-pdg-2
-%endif
-BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python-modules >= 1:2.7
-BuildArch:	noarch
-BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-stestr is parallel Python test runner designed to execute unittest
-test suites using multiple processes to split up execution of a test
-suite. It also will store a history of all test runs to help in
-debugging failures and optimizing the scheduler to improve speed. To
-accomplish this goal it uses the subunit protocol to facilitate
-streaming and storing results from multiple workers.
-
-%description -l pl.UTF-8
-sestr to narzędzie do równoległego uruchamiania testów pythonowych,
-zaprojektowane w celu uruchamiania zestawów testów unittest przy
-użyciu wielu procesów, aby podzielić wykonywanie testów. Narzędzie
-ponadto zapisuje historię wszystkich uruchomień testów, aby pomóc w
-diagnostyce niepowodzeń i optymalizacji planisty pod kątem szybkości.
-Aby osiągnąć ten cel, stestr używa protokołu subunit do strumieniowego
-przesyłania i zapisywania wyników od wielu procesów roboczych.
-
-%package -n python3-stestr
-Summary:	A parallel Python test runner built around subunit
-Summary(pl.UTF-8):	Zrównoleglone narzędzie do uruchamiania testów w Pythonie zbudowane wokół subunit
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.5
-
-%description -n python3-stestr
-stestr is parallel Python test runner designed to execute unittest
-test suites using multiple processes to split up execution of a test
-suite. It also will store a history of all test runs to help in
-debugging failures and optimizing the scheduler to improve speed. To
-accomplish this goal it uses the subunit protocol to facilitate
-streaming and storing results from multiple workers.
-
-%description -n python3-stestr -l pl.UTF-8
-sestr to narzędzie do równoległego uruchamiania testów pythonowych,
-zaprojektowane w celu uruchamiania zestawów testów unittest przy
-użyciu wielu procesów, aby podzielić wykonywanie testów. Narzędzie
-ponadto zapisuje historię wszystkich uruchomień testów, aby pomóc w
-diagnostyce niepowodzeń i optymalizacji planisty pod kątem szybkości.
-Aby osiągnąć ten cel, stestr używa protokołu subunit do strumieniowego
-przesyłania i zapisywania wyników od wielu procesów roboczych.
-
-%package apidocs
-Summary:	API documentation for Python stestr module
-Summary(pl.UTF-8):	Dokumentacja API modułu Pythona stestr
-Group:		Documentation
-
-%description apidocs
-API documentation for Python stestr module.
-
-%description apidocs -l pl.UTF-8
-Dokumentacja API modułu Pythona stestr.
-
-%prep
-%setup -q -n stestr-%{version}
-%patch -P 0 -p1
-%patch -P 1 -p1
-
-%build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-install -d build-2/bin
-ln -sf %{_bindir}/subunit2sql-db-manage-2 build-2/bin/subunit2sql-db-manage
-cat >build-2/bin/stestr <<EOF
-#!/bin/sh
-
-%{__python} $(pwd)/stestr/__main__.py
-EOF
-chmod 755 build-2/bin/stestr
-
-PATH=$(pwd)/build-2/bin:$PATH \
-PYTHONPATH=$(pwd) \
-%{__python} -m stestr run
-%endif
-%endif
-
-%if %{with python3}
-%py3_build
-
-%if %{with tests}
-install -d build-3/bin
-ln -sf %{_bindir}/subunit2sql-db-manage-3 build-3/bin/subunit2sql-db-manage
-cat >build-3/bin/stestr <<EOF
-#!/bin/sh
-
-%{__python3} $(pwd)/stestr/__main__.py
-EOF
-chmod 755 build-3/bin/stestr
-
-PATH=$(pwd)/build-3/bin:$PATH \
-PYTHONPATH=$(pwd) \
-%{__python3} -m stestr run
-%endif
-%endif
-
-%if %{with doc}
-sphinx-build-2 -b html doc/source doc/build/html
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/stestr/tests
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/stestr{,-2}
-%endif
-
-%if %{with python3}
-%py3_install
-
-%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/stestr/tests
-
-%{__mv} $RPM_BUILD_ROOT%{_bindir}/stestr{,-3}
-ln -sf stestr-3 $RPM_BUILD_ROOT%{_bindir}/stestr
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README.rst
-%lang(ja) %doc README_ja.rst
-%attr(755,root,root) %{_bindir}/stestr-2
-%{py_sitescriptdir}/stestr
-%{py_sitescriptdir}/stestr-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-stestr
-%defattr(644,root,root,755)
-%doc AUTHORS ChangeLog README.rst
-%lang(ja) %doc README_ja.rst
-%attr(755,root,root) %{_bindir}/stestr
-%attr(755,root,root) %{_bindir}/stestr-3
-%{py3_sitescriptdir}/stestr
-%{py3_sitescriptdir}/stestr-%{version}-py*.egg-info
-%endif
-
-%if %{with doc}
-%files apidocs
-%defattr(644,root,root,755)
-%doc doc/build/html/{_static,api,*.html,*.js}
-%endif
diff --git a/python3-stestr.spec b/python3-stestr.spec
new file mode 100644
index 0000000..8f841d3
--- /dev/null
+++ b/python3-stestr.spec
@@ -0,0 +1,116 @@
+#
+# Conditional build:
+%bcond_without	doc	# Sphinx documentation
+%bcond_with	tests	# unit tests (loong)
+
+Summary:	A parallel Python test runner built around subunit
+Summary(pl.UTF-8):	Zrównoleglone narzędzie do uruchamiania testów w Pythonie zbudowane wokół subunit
+Name:		python3-stestr
+Version:	4.2.0
+Release:	1
+License:	Apache v2.0
+Group:		Libraries/Python
+#Source0Download: https://pypi.org/simple/stestr/
+#Source0:	https://files.pythonhosted.org/packages/source/s/stestr/stestr-%{version}.tar.gz
+# no docs in sdist, use git archive instead
+Source0:	https://github.com/mtreinish/stestr/archive/%{version}/stestr-%{version}.tar.gz
+# Source0-md5:	2caebe66770c955fc702ff6767cc9303
+URL:		https://pypi.org/project/stestr/
+BuildRequires:	python3-build
+BuildRequires:	python3-flit_core >= 3.12
+BuildRequires:	python3-flit_core < 4
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.8
+%if %{with tests}
+BuildRequires:	python3-PyYAML >= 3.10.0
+BuildRequires:	python3-cliff >= 2.8.0
+BuildRequires:	python3-ddt >= 1.0.1
+BuildRequires:	python3-iso8601
+BuildRequires:	python3-fixtures >= 3.0.0
+BuildRequires:	python3-subunit >= 1.4.0
+BuildRequires:	python3-testtools >= 2.2.0
+BuildRequires:	python3-tomlkit >= 0.11.6
+BuildRequires:	python3-voluptuous >= 0.8.9
+%endif
+%if %{with doc}
+BuildRequires:	python3-cliff >= 2.8.0
+BuildRequires:	sphinx-pdg-3 >= 2.1.1
+%endif
+BuildRequires:	rpm-pythonprov
+BuildRequires:	rpmbuild(macros) >= 2.044
+Requires:	python3-modules >= 1:3.8
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+stestr is parallel Python test runner designed to execute unittest
+test suites using multiple processes to split up execution of a test
+suite. It also will store a history of all test runs to help in
+debugging failures and optimizing the scheduler to improve speed. To
+accomplish this goal it uses the subunit protocol to facilitate
+streaming and storing results from multiple workers.
+
+%description -l pl.UTF-8
+sestr to narzędzie do równoległego uruchamiania testów pythonowych,
+zaprojektowane w celu uruchamiania zestawów testów unittest przy
+użyciu wielu procesów, aby podzielić wykonywanie testów. Narzędzie
+ponadto zapisuje historię wszystkich uruchomień testów, aby pomóc w
+diagnostyce niepowodzeń i optymalizacji planisty pod kątem szybkości.
+Aby osiągnąć ten cel, stestr używa protokołu subunit do strumieniowego
+przesyłania i zapisywania wyników od wielu procesów roboczych.
+
+%package apidocs
+Summary:	API documentation for Python stestr module
+Summary(pl.UTF-8):	Dokumentacja API modułu Pythona stestr
+Group:		Documentation
+
+%description apidocs
+API documentation for Python stestr module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona stestr.
+
+%prep
+%setup -q -n stestr-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+
+PYTHONPATH=$(pwd)/build-3-test \
+%{__python3} -m stestr run
+%endif
+
+%if %{with doc}
+sphinx-build-3 -b html doc/source doc/build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/stestr/tests
+
+%{__mv} $RPM_BUILD_ROOT%{_bindir}/stestr{,-3}
+ln -sf stestr-3 $RPM_BUILD_ROOT%{_bindir}/stestr
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc README.rst
+%lang(ja) %doc README_ja.rst
+%attr(755,root,root) %{_bindir}/stestr-3
+%{_bindir}/stestr
+%{py3_sitescriptdir}/stestr
+%{py3_sitescriptdir}/stestr-%{version}.dist-info
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/build/html/{_static,api,*.html,*.js}
+%endif
diff --git a/stestr-mock.patch b/stestr-mock.patch
deleted file mode 100644
index c58572f..0000000
--- a/stestr-mock.patch
+++ /dev/null
@@ -1,115 +0,0 @@
---- stestr-2.6.0/stestr/tests/repository/test_util.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/tests/repository/test_util.py	2024-02-21 20:24:39.075600625 +0100
-@@ -10,7 +10,10 @@
- # License for the specific language governing permissions and limitations
- # under the License.
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- import os
- import shutil
- import tempfile
---- stestr-2.6.0/stestr/tests/test_bisect_tests.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/tests/test_bisect_tests.py	2024-02-21 20:25:10.238765133 +0100
-@@ -13,8 +13,11 @@
- import io
- import operator
- 
--import mock
- import six
-+if six.PY3:
-+    from unittest import mock
-+else:
-+    import mock
- import subunit
- import testtools
- 
---- stestr-2.6.0/stestr/tests/test_config_file.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/tests/test_config_file.py	2024-02-21 20:25:39.635272545 +0100
-@@ -11,7 +11,10 @@
- # under the License.
- 
- import ddt
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- from stestr import config_file
- from stestr.tests import base
---- stestr-2.6.0/stestr/tests/test_scheduler.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/tests/test_scheduler.py	2024-02-21 20:26:07.935119232 +0100
-@@ -13,7 +13,10 @@
- import datetime
- import re
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- from subunit import iso8601
- 
- from stestr.repository import memory
---- stestr-2.6.0/stestr/tests/test_selection.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/tests/test_selection.py	2024-02-21 20:29:12.530785858 +0100
-@@ -12,8 +12,11 @@
- 
- import re
- 
--import mock
- import six
-+if six.PY3:
-+    from unittest import mock
-+else:
-+    import mock
- 
- from stestr import selection
- from stestr.tests import base
---- stestr-2.6.0/stestr/tests/test_subunit_trace.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/tests/test_subunit_trace.py	2024-02-21 20:27:20.928057128 +0100
-@@ -21,8 +21,11 @@ import sys
- from ddt import data
- from ddt import ddt
- from ddt import unpack
--from mock import patch
- import six
-+if six.PY3:
-+    from unittest.mock import patch
-+else:
-+    from mock import patch
- 
- from stestr import subunit_trace
- from stestr.tests import base
---- stestr-2.6.0/stestr/tests/test_test_processor.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/tests/test_test_processor.py	2024-02-21 20:27:57.941189944 +0100
-@@ -12,7 +12,10 @@
- 
- import subprocess
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- from stestr import test_processor
- from stestr.tests import base
---- stestr-2.6.0/stestr/tests/test_user_config.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/tests/test_user_config.py	2024-02-21 20:28:26.074370867 +0100
-@@ -13,7 +13,10 @@
- import io
- import os
- 
--import mock
-+try:
-+    from unittest import mock
-+except ImportError:
-+    import mock
- 
- from stestr.tests import base
- from stestr import user_config
diff --git a/stestr-no-py3-future.patch b/stestr-no-py3-future.patch
deleted file mode 100644
index acb4fa0..0000000
--- a/stestr-no-py3-future.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- stestr-2.6.0/stestr/repository/file.py.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/stestr/repository/file.py	2024-02-21 20:15:32.165230159 +0100
-@@ -16,10 +16,14 @@ import errno
- from io import BytesIO
- from operator import methodcaller
- import os
-+import six
- import sys
- import tempfile
- 
--from future.moves.dbm import dumb as my_dbm
-+if six.PY3:
-+    from dbm import dumb as my_dbm
-+else:
-+    import dumbdbm as my_dbm
- from subunit import TestProtocolClient
- import subunit.v2
- import testtools
---- stestr-2.6.0/requirements.txt.orig	2019-12-13 19:59:07.000000000 +0100
-+++ stestr-2.6.0/requirements.txt	2024-02-22 20:50:40.689071684 +0100
-@@ -1,7 +1,6 @@
- # The order of packages is significant, because pip processes them in the order
- # of appearance. Changing the order has an impact on the overall integration
- # process, which may cause wedges in the gate later.
--future
- pbr!=2.1.0,>=2.0.0,!=4.0.0,!=4.0.1,!=4.0.2,!=4.0.3 # Apache-2.0
- cliff>=2.8.0 # Apache-2.0
- python-subunit>=1.3.0 # Apache-2.0/BSD
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-stestr.git/commitdiff/91ff72ce1b8a20b8e0b6b51102cde1a6c0e27342



More information about the pld-cvs-commit mailing list