rdobuilder 41f67e
%global pypi_name stestr
rdobuilder 41f67e
# Enable bootstrap
rdobuilder 41f67e
%bcond_without bootstrap
rdobuilder 41f67e
%global with_doc 1
rdobuilder 41f67e
rdobuilder 41f67e
%global common_desc \
rdobuilder 41f67e
stestr is a fork of the testrepository that concentrates on being a \
rdobuilder 41f67e
dedicated test runner for python projects. The generic abstraction layers \
rdobuilder 41f67e
which enabled testr to work with any subunit emitting runner are gone. \
rdobuilder 41f67e
stestr hard codes python-subunit-isms into how it works.
rdobuilder 41f67e
rdobuilder 41f67e
Name:       python-%{pypi_name}
rdobuilder 41f67e
Version:    4.1.0
rdobuilder 41f67e
Release:    1%{?dist}
rdobuilder 41f67e
Summary:    A test runner runner similar to testrepository
rdobuilder 41f67e
rdobuilder 41f67e
License:    ASL 2.0
rdobuilder 41f67e
URL:        https://pypi.python.org/pypi/stestr
rdobuilder 41f67e
Source0:    %pypi_source
rdobuilder 41f67e
BuildArch:  noarch
rdobuilder 41f67e
rdobuilder 41f67e
rdobuilder 41f67e
%description
rdobuilder 41f67e
%{common_desc}
rdobuilder 41f67e
rdobuilder 41f67e
%package -n     python%{python3_pkgversion}-%{pypi_name}
rdobuilder 41f67e
Summary:        A test runner runner similar to testrepository
rdobuilder 41f67e
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
rdobuilder 41f67e
rdobuilder 41f67e
BuildRequires:    python%{python3_pkgversion}-devel
rdobuilder 41f67e
BuildRequires:  pyproject-rpm-macros
rdobuilder 41f67e
BuildRequires:    git-core
rdobuilder 41f67e
rdobuilder 41f67e
Requires:   python%{python3_pkgversion}-pbr
rdobuilder 41f67e
Requires:   python%{python3_pkgversion}-subunit >= 1.4.0
rdobuilder 41f67e
Requires:   python%{python3_pkgversion}-fixtures >= 3.0.0
rdobuilder 41f67e
Requires:   python%{python3_pkgversion}-testtools >= 2.2.0
rdobuilder 41f67e
Requires:   python%{python3_pkgversion}-PyYAML >= 3.10.0
rdobuilder 41f67e
Requires:   python%{python3_pkgversion}-cliff >= 2.8.0
rdobuilder 41f67e
Requires:   python%{python3_pkgversion}-voluptuous >= 0.8.9
rdobuilder 41f67e
rdobuilder 41f67e
%description -n python%{python3_pkgversion}-%{pypi_name}
rdobuilder 41f67e
%{common_desc}
rdobuilder 41f67e
rdobuilder 41f67e
%if %{without bootstrap}
rdobuilder 41f67e
%package -n     python%{python3_pkgversion}-%{pypi_name}-sql
rdobuilder 41f67e
Summary:        sql plugin for stestr
rdobuilder 41f67e
rdobuilder 41f67e
BuildRequires:  /usr/bin/subunit2sql-db-manage
rdobuilder 41f67e
Requires:       python%{python3_pkgversion}-%{pypi_name} = %{version}-%{release}
rdobuilder 41f67e
Requires:       python%{python3_pkgversion}-subunit2sql
rdobuilder 41f67e
rdobuilder 41f67e
%description    -n python%{python3_pkgversion}-%{pypi_name}-sql
rdobuilder 41f67e
It contains the sql plugin for stestr.
rdobuilder 41f67e
%endif
rdobuilder 41f67e
rdobuilder 41f67e
%if 0%{?with_doc}
rdobuilder 41f67e
%package -n python-%{pypi_name}-doc
rdobuilder 41f67e
Summary:        stestr documentation
rdobuilder 41f67e
rdobuilder 41f67e
%description -n python-%{pypi_name}-doc
rdobuilder 41f67e
%{common_desc}
rdobuilder 41f67e
rdobuilder 41f67e
It contains the documentation for stestr.
rdobuilder 41f67e
%endif
rdobuilder 41f67e
rdobuilder 41f67e
%generate_buildrequires
rdobuilder 41f67e
%pyproject_buildrequires -t %{!?with_bootstrap:-x sql}
rdobuilder 41f67e
rdobuilder 41f67e
%prep
rdobuilder 41f67e
%autosetup -n %{pypi_name}-%{version} -S git
rdobuilder 41f67e
sed -i '/doc8.*/d' test-requirements.txt
rdobuilder 41f67e
sed -i '/hacking.*/d' test-requirements.txt
rdobuilder 41f67e
sed -i '/black.*/d' test-requirements.txt
rdobuilder 41f67e
# Replace removed SafeConfigParser with ConfigParser
rdobuilder 41f67e
# Upstream: https://github.com/mtreinish/stestr/pull/344
rdobuilder 41f67e
sed -i 's/SafeConfigParser/ConfigParser/' stestr/commands/run.py
rdobuilder 41f67e
rdobuilder 41f67e
%build
rdobuilder 41f67e
%pyproject_wheel
rdobuilder 41f67e
rdobuilder 41f67e
%if 0%{?with_doc}
rdobuilder 41f67e
# generate html docs
rdobuilder 41f67e
PYTHONPATH=%{pyproject_build_lib} sphinx-build doc/source doc/build/html
rdobuilder 41f67e
# remove the sphinx-build leftovers
rdobuilder 41f67e
rm -rf doc/build/html/.{doctrees,buildinfo}
rdobuilder 41f67e
%endif
rdobuilder 41f67e
rdobuilder 41f67e
%install
rdobuilder 41f67e
%pyproject_install
rdobuilder 41f67e
%pyproject_save_files %{pypi_name}
rdobuilder 41f67e
# compat symlinks
rdobuilder 41f67e
ln -s stestr %{buildroot}/%{_bindir}/stestr-3
rdobuilder 41f67e
ln -s stestr-3 %{buildroot}/%{_bindir}/stestr-%{python3_version}
rdobuilder 41f67e
rdobuilder 41f67e
%check
rdobuilder 41f67e
%tox
rdobuilder 41f67e
rdobuilder 41f67e
%files -n python%{python3_pkgversion}-%{pypi_name} -f %{pyproject_files}
rdobuilder 41f67e
%license LICENSE
rdobuilder 41f67e
%{_bindir}/stestr*
rdobuilder 41f67e
rdobuilder 41f67e
%if %{without bootstrap}
rdobuilder 41f67e
%files -n python%{python3_pkgversion}-%{pypi_name}-sql
rdobuilder 41f67e
%{python3_sitelib}/%{pypi_name}/repository/sql.py
rdobuilder 41f67e
%endif
rdobuilder 41f67e
rdobuilder 41f67e
%if 0%{?with_doc}
rdobuilder 41f67e
%files -n python-%{pypi_name}-doc
rdobuilder 41f67e
%license LICENSE
rdobuilder 41f67e
%doc README.rst
rdobuilder 41f67e
%doc doc/build/html
rdobuilder 41f67e
%endif
rdobuilder 41f67e
rdobuilder 41f67e
%changelog
rdobuilder 41f67e
* Tue Sep 19 2023 Lumír Balhar <lbalhar@redhat.com> - 4.1.0-1
rdobuilder 41f67e
- Update to 4.1.0 (rhbz#2239471)
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.0.1-3
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 4.0.1-2
rdobuilder 41f67e
- Rebuilt for Python 3.12
rdobuilder 41f67e
rdobuilder 41f67e
* Wed Feb 08 2023 Joel Capitao <jcapitao@redhat.com> - 4.0.1-1
rdobuilder 41f67e
- Update to latest upstream (#1482280)
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-7
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-6
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 3.2.0-5
rdobuilder 41f67e
- Rebuilt for Python 3.11
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-4
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.2.0-3
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Mon Jul 05 2021 Miro Hrončok <mhroncok@redhat.com> - 3.2.0-2
rdobuilder 41f67e
- Reintroduce the Dist Tag (e.g. fc35) to the release value
rdobuilder 41f67e
rdobuilder 41f67e
* Mon Jun 28 2021 Joel Capitao <jcapitao@redhat.com> - 3.2.0-1
rdobuilder 41f67e
- Update to 3.2.0 (#1480520)
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.6.0-9
rdobuilder 41f67e
- Rebuilt for Python 3.10
rdobuilder 41f67e
rdobuilder 41f67e
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-8
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-7
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-6
rdobuilder 41f67e
- Rebuilt for Python 3.9
rdobuilder 41f67e
rdobuilder 41f67e
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-5
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Tue Dec 17 2019 Chandan Kumar <raukadah@gmail.com> - 2.6.0-1
rdobuilder 41f67e
- Bumped to version 2.6.0
rdobuilder 41f67e
rdobuilder 41f67e
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-4
rdobuilder 41f67e
- Rebuilt for Python 3.8.0rc1 (#1748018)
rdobuilder 41f67e
rdobuilder 41f67e
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2.4.0-3
rdobuilder 41f67e
- Rebuilt for Python 3.8
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-2
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Tue Jul 23 2019 Chandan Kumar <chkumar246@gmail.com> - 2.4.0-1
rdobuilder 41f67e
- Update to 2.4.0
rdobuilder 41f67e
- Removed patch "Discover python executable when discover is not used"
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Jun 07 2019 Alfredo Moralejo <amoralej@redhat.com> - 2.3.1-1
rdobuilder 41f67e
- Update to 2.3.1
rdobuilder 41f67e
- Included patch "Discover python executable when discover is not used"
rdobuilder 41f67e
rdobuilder 41f67e
* Thu Feb 14 2019 Yatin Karel <ykarel@redhat.com> - 2.2.0-1
rdobuilder 41f67e
- Update to 2.2.0 and Enable py2 build for CentOS <= 7
rdobuilder 41f67e
rdobuilder 41f67e
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.0-3
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Oct 12 2018 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 2.1.0-2
rdobuilder 41f67e
- Python2 binary package has been removed
rdobuilder 41f67e
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
rdobuilder 41f67e
rdobuilder 41f67e
* Mon Jul 30 2018 Chandan Kumar <chkumar246@gmail.com> - 2.1.0-1
rdobuilder 41f67e
- Bump to version 2.1.0
rdobuilder 41f67e
- Synced requirements for newer version
rdobuilder 41f67e
- Closes-Bug RHBZ#1480520
rdobuilder 41f67e
rdobuilder 41f67e
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-5
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-4
rdobuilder 41f67e
- Rebuilt for Python 3.7
rdobuilder 41f67e
rdobuilder 41f67e
* Mon Mar 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.1.0-3
rdobuilder 41f67e
- Update Python 2 dependency declarations to new packaging standards
rdobuilder 41f67e
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-2
rdobuilder 41f67e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
rdobuilder 41f67e
rdobuilder 41f67e
* Tue Oct 17 2017 Chandan Kumar <chkumar246@gmail.com> - 1.1.0-1
rdobuilder 41f67e
- Update the spec to 1.1.0
rdobuilder 41f67e
- Enable tests
rdobuilder 41f67e
- Moved python2-subunit2sql under docs
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Sep 15 2017 Chandan Kumar <chkumar246@gmail.com> - 1.0.0-4
rdobuilder 41f67e
- Disable tests
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Sep 15 2017 Chandan Kumar <chkumar246@gmail.com> - 1.0.0-3
rdobuilder 41f67e
- Fixed test requirements and enabled subunit2sql
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Sep 15 2017 Chandan Kumar <chkumar246@gmail.com> - 1.0.0-2
rdobuilder 41f67e
- Disable subunit2sql
rdobuilder 41f67e
rdobuilder 41f67e
* Fri Sep 15 2017 Chandan Kumar <chkumar246@gmail.com> - 1.0.0-1
rdobuilder 41f67e
- Bumped to 1.0.0
rdobuilder 41f67e
rdobuilder 41f67e
* Thu Aug 10 2017 Chandan Kumar <chkumar246@gmail.com> - 0.5.0-4
rdobuilder 41f67e
- Added -sql subpackage
rdobuilder 41f67e
rdobuilder 41f67e
* Tue Aug 01 2017 Chandan Kumar <chkumar246@gmail.com> - 0.5.0-3
rdobuilder 41f67e
- Use sed to remove pbr>=2.0.0 dependency
rdobuilder 41f67e
rdobuilder 41f67e
* Tue Aug 01 2017 Chandan Kumar <chkumar246@gmail.com> - 0.5.0-2
rdobuilder 41f67e
- Fixed rpmlint errors
rdobuilder 41f67e
rdobuilder 41f67e
* Mon Jul 31 2017 Chandan Kumar <chkumar246@gmail.com> - 0.5.0-1
rdobuilder 41f67e
- Initial package.