%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global pypi_name os-testr
%global common_description %{expand:
ostestr is a testr wrapper that uses subunit-trace for output and builds
some helpful extra functionality around testr.}
Name: python-%{pypi_name}
Version: 0.8.0
Release: 10%{?dist}
Summary: A testr wrapper to provide functionality for OpenStack projects
License: ASL 2.0
URL: http://git.openstack.org/cgit/openstack/%{pypi_name}
Source0: http://tarballs.openstack.org/os-testr/os-testr-%{upstream_version}.tar.gz
BuildArch: noarch
%description %{common_description}
%package -n python3-%{pypi_name}
Summary: %{summary}
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
Requires: python3-pbr
Requires: python3-babel
Requires: python3-testrepository
Requires: python3-subunit
Requires: python3-testtools
Requires: python3-setuptools
%{?python_provide:%python_provide python3-%{pypi_name}}
%description -n python3-%{pypi_name} %{common_description}
%package doc
Summary: Documentation for ostestr module
BuildRequires: python3-sphinx
BuildRequires: python3-oslo-sphinx
BuildRequires: python3-sphinx
Provides: python3-%{pypi_name}-doc = %{version}-%{release}
Obsoletes: python3-%{pypi_name}-doc < 0.8.0-8
%description doc
Documentation for ostestr module.
%prep
%setup -q -n %{pypi_name}-%{upstream_version}
# Let RPM handle the dependencies
rm -f test-requirements.txt requirements.txt
# delete shebangs
find -name '*.py' | xargs sed -i -e '1 {/^#!/d}'
%build
%py3_build
sphinx-build-3 -b html -d build/doctrees doc/source doc/build/html
# Fix hidden-file-or-dir warnings
rm -fr doc/build/html/.buildinfo
%install
%py3_install
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{_bindir}/generate-subunit
%{_bindir}/ostestr
%{_bindir}/subunit-trace
%{_bindir}/subunit2html
%{python3_sitelib}/os_testr
%{python3_sitelib}/os_testr-*.egg-info
%files doc
%license LICENSE
%doc doc/build/html
%changelog
* Mon Feb 25 2019 Miro Hrončok <mhroncok@redhat.com> - 0.8.0-10
- Subpackage python2-os-testr has been removed
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Dec 12 2018 Carl George <carl@george.computer> - 0.8.0-8
- Remove all shebangs to prevent incorrect dependencies rhbz#1391119
- Remove python3-os-testr-doc subpackage (duplicate content of python-os-testr-doc)
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 0.8.0-6
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 26 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.8.0-4
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.8.0-3
- Python 2 binary package renamed to python2-os-testr
See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.8.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Thu Sep 29 2016 Chandan Kumar <chkumar@redhat.com> 0.8.0-1
- Update to 0.8.0
* Sun Sep 11 2016 Haikel Guemar <hguemar@fedoraproject.org> 0.7.0-1
- Update to 0.7.0