2017-09-14 12:43:20 +00:00
|
|
|
#
|
2020-02-28 21:48:25 +00:00
|
|
|
# spec file for package python
|
2017-09-14 12:43:20 +00:00
|
|
|
#
|
2021-02-08 13:05:48 +00:00
|
|
|
# Copyright (c) 2021 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
|
|
|
#
|
|
|
|
|
|
|
|
|
2020-12-14 21:35:33 +00:00
|
|
|
%{?!python_module:%define python_module() python3-%{**}}
|
|
|
|
# depending on openstack packages: stay on primary python interpreter only
|
|
|
|
%define pythons python3
|
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
|
|
|
|
Name: python-stestr%{psuffix}
|
2021-02-08 13:05:48 +00:00
|
|
|
Version: 3.1.0
|
2017-09-14 12:43:20 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: A test runner runner similar to testrepository
|
|
|
|
License: Apache-2.0
|
|
|
|
Group: Development/Languages/Python
|
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
|
2019-11-19 11:06:57 +00:00
|
|
|
BuildRequires: %{python_module pbr >= 2.0.0}
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-11-19 11:09:52 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: python3-dbm
|
|
|
|
Requires: python-PyYAML >= 3.10.0
|
|
|
|
Requires: python-cliff >= 2.8.0
|
|
|
|
Requires: python-fixtures >= 3.0.0
|
|
|
|
Requires: python-future
|
|
|
|
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-six >= 1.10.0
|
|
|
|
Requires: python-testtools >= 2.2.0
|
|
|
|
Requires: python-voluptuous >= 0.8.9
|
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
|
|
|
BuildArch: noarch
|
2019-11-19 11:06:57 +00:00
|
|
|
%if %{with test}
|
2018-08-06 11:07:17 +00:00
|
|
|
BuildRequires: %{python_module PyYAML >= 3.10.0}
|
2019-03-13 13:02:25 +00:00
|
|
|
BuildRequires: %{python_module SQLAlchemy}
|
2018-08-06 11:07:17 +00:00
|
|
|
BuildRequires: %{python_module cliff >= 2.8.0}
|
|
|
|
BuildRequires: %{python_module coverage >= 4.0}
|
|
|
|
BuildRequires: %{python_module ddt >= 1.0.1}
|
|
|
|
BuildRequires: %{python_module fixtures >= 3.0.0}
|
|
|
|
BuildRequires: %{python_module future}
|
2020-03-31 12:22:41 +00:00
|
|
|
BuildRequires: %{python_module pytest-mock}
|
2019-03-13 13:02:25 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2020-04-09 10:47:49 +00:00
|
|
|
BuildRequires: %{python_module python-subunit >= 1.4.0}
|
2018-08-06 11:07:17 +00:00
|
|
|
BuildRequires: %{python_module six >= 1.10.0}
|
2019-11-19 11:06:57 +00:00
|
|
|
BuildRequires: %{python_module stestr >= %{version}}
|
2018-08-06 11:07:17 +00:00
|
|
|
BuildRequires: %{python_module testtools >= 2.2.0}
|
|
|
|
BuildRequires: %{python_module voluptuous >= 0.8.9}
|
2019-11-19 11:06:57 +00:00
|
|
|
%endif
|
2018-08-24 09:36:45 +00:00
|
|
|
%ifpython3
|
2019-03-13 13:02:25 +00:00
|
|
|
Requires: python-dbm
|
2018-08-24 09:36:45 +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
|
|
|
|
stestr is a fork of the `testrepository`_ that concentrates on being a
|
|
|
|
dedicated test runner for python projects. The generic abstraction
|
|
|
|
layers which enabled testr to work with any subunit emitting runner are gone.
|
|
|
|
stestr hard codes python-subunit-isms into how it works. The code base is also
|
|
|
|
designed to try and be explicit, and to provide a python api that is documented
|
|
|
|
and has examples.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n stestr-%{version}
|
2019-03-13 13:02:25 +00:00
|
|
|
# do not test sql
|
|
|
|
rm stestr/tests/repository/test_sql.py
|
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"
|
2019-11-19 11:09:52 +00:00
|
|
|
%pytest stestr/tests -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
|
2019-10-30 13:18:01 +00:00
|
|
|
export LC_ALL="en_US.UTF8"
|
2017-09-14 12:43:20 +00:00
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
2019-10-30 13:18:01 +00:00
|
|
|
export LC_ALL="en_US.UTF8"
|
2017-09-14 12:43:20 +00:00
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/stestr
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative stestr
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative stestr
|
|
|
|
|
|
|
|
%files %{python_files}
|
2018-08-06 09:06:28 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc ChangeLog README.rst
|
2017-09-14 12:43:20 +00:00
|
|
|
%python_alternative %{_bindir}/stestr
|
|
|
|
%{python_sitelib}/*
|
2019-11-19 11:06:57 +00:00
|
|
|
%endif
|
2017-09-14 12:43:20 +00:00
|
|
|
|
|
|
|
%changelog
|