2017-09-14 12:43:20 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-stestr
|
|
|
|
#
|
2019-03-13 13:02:25 +00:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
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
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-stestr
|
2019-09-10 10:00:32 +00:00
|
|
|
Version: 2.5.1
|
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
|
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}
|
2019-03-13 13:02:25 +00:00
|
|
|
BuildRequires: %{python_module mock >= 2.0}
|
2017-09-14 12:43:20 +00:00
|
|
|
BuildRequires: %{python_module pbr >= 2.0.0}
|
2019-03-13 13:02:25 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2018-08-06 11:07:17 +00:00
|
|
|
BuildRequires: %{python_module python-subunit >= 1.3.0}
|
2017-09-14 12:43:20 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-08-06 11:07:17 +00:00
|
|
|
BuildRequires: %{python_module six >= 1.10.0}
|
|
|
|
BuildRequires: %{python_module testtools >= 2.2.0}
|
|
|
|
BuildRequires: %{python_module voluptuous >= 0.8.9}
|
2017-09-14 12:43:20 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-03-13 13:02:25 +00:00
|
|
|
BuildRequires: python3-dbm
|
2017-09-14 12:43:20 +00:00
|
|
|
Requires: python-PyYAML >= 3.10.0
|
2018-08-06 11:07:17 +00:00
|
|
|
Requires: python-cliff >= 2.8.0
|
2017-09-14 12:43:20 +00:00
|
|
|
Requires: python-fixtures >= 3.0.0
|
|
|
|
Requires: python-future
|
|
|
|
Requires: python-pbr >= 2.0.0
|
2018-08-06 11:07:17 +00:00
|
|
|
Requires: python-python-subunit >= 1.3.0
|
2017-09-14 12:43:20 +00:00
|
|
|
Requires: python-six >= 1.10.0
|
|
|
|
Requires: python-testtools >= 2.2.0
|
2018-08-07 20:20:40 +00:00
|
|
|
Requires: python-voluptuous >= 0.8.9
|
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
|
2017-09-14 12:43:20 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
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
|
|
|
BuildArch: noarch
|
|
|
|
%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
|
|
|
|
|
|
|
%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}
|
|
|
|
|
2019-03-13 13:02:25 +00:00
|
|
|
%check
|
2019-10-30 13:18:01 +00:00
|
|
|
export LC_ALL="en_US.UTF8"
|
2019-09-10 10:00:32 +00:00
|
|
|
# test_empty_with_pretty_out - edge case not triggered in OBS
|
2019-03-13 13:02:25 +00:00
|
|
|
%{python_expand mkdir build/bin
|
|
|
|
for filepath in %{buildroot}/%{_bindir}/stestr*-%{$python_bin_suffix}; do
|
|
|
|
filename=$(basename $filepath)
|
|
|
|
unsuffixed=${filename/-%{$python_bin_suffix}/}
|
|
|
|
cp $filepath build/bin/$unsuffixed
|
|
|
|
done
|
|
|
|
export PATH="$(pwd)/build/bin:$PATH"
|
|
|
|
export PYTHONPATH=%{buildroot}%{$python_sitelib}
|
2019-09-10 10:00:32 +00:00
|
|
|
py.test-%{$python_bin_suffix} -v stestr/tests -k 'not test_empty_with_pretty_out'
|
2019-03-13 13:02:25 +00:00
|
|
|
rm -r build/bin
|
|
|
|
}
|
|
|
|
|
2017-09-14 12:43:20 +00:00
|
|
|
%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}/*
|
|
|
|
|
|
|
|
%changelog
|