2017-09-14 12:43:20 +00:00
|
|
|
#
|
2021-10-16 20:25:01 +00:00
|
|
|
# spec file
|
2017-09-14 12:43:20 +00:00
|
|
|
#
|
2024-01-04 23:07:49 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2017-09-14 12:43:20 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2018-12-07 13:44:02 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2017-09-14 12:43:20 +00:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-11-19 11:06:57 +00:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -%{flavor}
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
2025-08-06 16:11:47 +00:00
|
|
|
|
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%bcond_without libalternatives
|
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
2019-11-19 11:06:57 +00:00
|
|
|
Name: python-stestr%{psuffix}
|
2025-08-06 16:11:47 +00:00
|
|
|
Version: 4.2.0
|
2017-09-14 12:43:20 +00:00
|
|
|
Release: 0
|
2022-08-20 21:30:48 +00:00
|
|
|
Summary: A parallel Python test runner built around subunit
|
2017-09-14 12:43:20 +00:00
|
|
|
License: Apache-2.0
|
2018-08-06 11:07:17 +00:00
|
|
|
URL: https://github.com/mtreinish/stestr
|
2017-09-14 12:43:20 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/stestr/stestr-%{version}.tar.gz
|
2025-08-06 16:11:47 +00:00
|
|
|
BuildRequires: %{python_module flit-core}
|
2019-11-19 11:06:57 +00:00
|
|
|
BuildRequires: %{python_module pbr >= 2.0.0}
|
2023-09-05 06:10:42 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2019-11-19 11:06:57 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-09-05 06:10:42 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-11-19 11:09:52 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2025-08-06 16:11:47 +00:00
|
|
|
%if %{with libalternatives}
|
|
|
|
Requires: alts
|
|
|
|
BuildRequires: alts
|
|
|
|
%else
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun):update-alternatives
|
|
|
|
%endif
|
2019-11-19 11:09:52 +00:00
|
|
|
Requires: python-PyYAML >= 3.10.0
|
2024-01-04 23:19:19 +00:00
|
|
|
Requires: python-cliff >= 2.8.0
|
|
|
|
Requires: python-dbm
|
2019-11-19 11:09:52 +00:00
|
|
|
Requires: python-fixtures >= 3.0.0
|
|
|
|
Requires: python-pbr >= 2.0.0
|
2020-03-31 12:22:41 +00:00
|
|
|
Requires: python-python-subunit >= 1.4.0
|
2019-11-19 11:09:52 +00:00
|
|
|
Requires: python-testtools >= 2.2.0
|
2023-12-04 10:56:22 +00:00
|
|
|
Requires: python-tomlkit >= 0.11.6
|
2019-11-19 11:09:52 +00:00
|
|
|
Requires: python-voluptuous >= 0.8.9
|
|
|
|
BuildArch: noarch
|
2019-11-19 11:06:57 +00:00
|
|
|
%if %{with test}
|
2019-03-13 13:02:25 +00:00
|
|
|
BuildRequires: %{python_module SQLAlchemy}
|
2018-08-06 11:07:17 +00:00
|
|
|
BuildRequires: %{python_module ddt >= 1.0.1}
|
2023-12-04 10:56:22 +00:00
|
|
|
BuildRequires: %{python_module iso8601}
|
2019-03-13 13:02:25 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2022-08-20 21:30:48 +00:00
|
|
|
BuildRequires: %{python_module stestr = %{version}}
|
2019-11-19 11:06:57 +00:00
|
|
|
%endif
|
2019-01-12 15:42:41 +00:00
|
|
|
%if !0%{?_no_weakdeps}
|
2019-03-13 13:02:25 +00:00
|
|
|
Recommends: python-SQLAlchemy
|
|
|
|
Recommends: python-subunit2sql >= 1.8.0
|
2019-01-12 15:42:41 +00:00
|
|
|
%endif
|
2017-09-14 12:43:20 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2022-08-20 21:30:48 +00:00
|
|
|
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.
|
|
|
|
|
|
|
|
stestr originally started as a fork of the testrepository project. But, instead
|
|
|
|
of being an interface for any test runner that used subunit, like testrepository,
|
|
|
|
stestr concentrated on being a dedicated test runner for python projects. While
|
|
|
|
stestr was originally forked from testrepository it is not backwards compatible
|
|
|
|
with testrepository. At a high level the basic concepts of operation are shared
|
|
|
|
between the two projects but the actual usage is not exactly the same.
|
2017-09-14 12:43:20 +00:00
|
|
|
|
|
|
|
%prep
|
2023-09-05 06:10:42 +00:00
|
|
|
%autosetup -p1 -n stestr-%{version}
|
2017-09-14 12:43:20 +00:00
|
|
|
|
2019-11-19 11:06:57 +00:00
|
|
|
%if %{with test}
|
|
|
|
%check
|
|
|
|
export LC_ALL="en_US.UTF8"
|
2024-01-04 23:07:49 +00:00
|
|
|
%pytest stestr/tests -v -k 'not test_empty_with_pretty_out'
|
2019-11-19 11:06:57 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if ! %{with test}
|
2017-09-14 12:43:20 +00:00
|
|
|
%build
|
2023-09-05 06:10:42 +00:00
|
|
|
%pyproject_wheel
|
2017-09-14 12:43:20 +00:00
|
|
|
|
|
|
|
%install
|
2023-09-05 06:10:42 +00:00
|
|
|
%pyproject_install
|
2024-01-04 23:07:49 +00:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/stestr
|
2017-09-14 12:43:20 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
2025-08-06 16:11:47 +00:00
|
|
|
%pre
|
|
|
|
%python_libalternatives_reset_alternative stestr
|
|
|
|
|
2024-01-04 23:07:49 +00:00
|
|
|
%post
|
|
|
|
%python_install_alternative stestr
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative stestr
|
|
|
|
|
2017-09-14 12:43:20 +00:00
|
|
|
%files %{python_files}
|
2018-08-06 09:06:28 +00:00
|
|
|
%license LICENSE
|
2025-08-06 16:11:47 +00:00
|
|
|
%doc README.rst
|
2024-01-04 23:08:05 +00:00
|
|
|
%python_alternative %{_bindir}/stestr
|
2022-08-20 21:30:48 +00:00
|
|
|
%{python_sitelib}/stestr
|
2023-09-05 06:10:42 +00:00
|
|
|
%{python_sitelib}/stestr-%{version}.dist-info
|
2019-11-19 11:06:57 +00:00
|
|
|
%endif
|
2017-09-14 12:43:20 +00:00
|
|
|
|
|
|
|
%changelog
|