Blame python-os-testr.spec

1c53c83
06ee977
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
e2df308
%global pypi_name os-testr
e2df308
1c53c83
%global with_doc 1
bd2e2eb
07c1330
%global common_desc \
07c1330
ostestr is a testr wrapper that uses subunit-trace for output and builds \
07c1330
some helpful extra functionality around testr.
e2df308
e2df308
Name:           python-%{pypi_name}
2c6e34e
Version:        2.0.0
f072cec
Release:        2%{?dist}
e2df308
Summary:        A testr wrapper to provide functionality for OpenStack projects
e2df308
e2df308
License:        ASL 2.0
e2df308
URL:            http://git.openstack.org/cgit/openstack/%{pypi_name}
07c1330
Source0:        https://tarballs.openstack.org/os-testr/os-testr-%{upstream_version}.tar.gz
e2df308
BuildArch:      noarch
e2df308
2c6e34e
BuildRequires:  python3-devel
2c6e34e
BuildRequires:  python3-pbr
2c6e34e
BuildRequires:  python3-setuptools
07c1330
BuildRequires:  git
e2df308
07c1330
%description
07c1330
%{common_desc}
8344283
2c6e34e
%package -n python3-%{pypi_name}
1c53c83
Summary: %summary
2c6e34e
%{?python_provide:%python_provide python3-%{pypi_name}}
1c53c83
Obsoletes: python2-%{pypi_name} < %{version}-%{release}
1c53c83
2c6e34e
Requires:       python3-pbr
2c6e34e
Requires:       python3-stestr
2c6e34e
Requires:       python3-subunit
2c6e34e
Requires:       python3-testtools
1c53c83
2c6e34e
%description -n python3-%{pypi_name}
07c1330
%{common_desc}
bd2e2eb
1c53c83
%if 0%{?with_doc}
1c53c83
%package -n python-%{pypi_name}-doc
07c1330
Summary: Documentation for ostestr module
2c6e34e
BuildRequires:  python3-sphinx
2c6e34e
BuildRequires:  python3-openstackdocstheme
bd2e2eb
1c53c83
%description -n python-%{pypi_name}-doc
07c1330
Documentation for ostestr module
1c53c83
%endif
e2df308
e2df308
%prep
07c1330
%autosetup -n %{pypi_name}-%{upstream_version} -S git
e2df308
e2df308
# Let RPM handle the dependencies
07c1330
rm -rf *requirements.txt
e2df308
e2df308
%build
2c6e34e
%{py3_build}
a82a82f
1c53c83
%if 0%{?with_doc}
07c1330
# generate html docs
2c6e34e
sphinx-build-3 -W -b html doc/source doc/build/html
2c6e34e
# remove the sphinx-build-3 leftovers
07c1330
rm -rf doc/build/html/.{doctrees,buildinfo}
1c53c83
%endif
e2df308
e2df308
%install
2c6e34e
%{py3_install}
2c6e34e
for file in %{buildroot}%{python3_sitelib}/os_testr/{subunit_trace,ostestr,subunit2html}.py; do
07c1330
    chmod a+x $file
07c1330
done
e2df308
1c53c83
# Fix ambiguous shebangs for RHEL > 7 and Fedora > 29
1c53c83
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{python3_sitelib}/os_testr/
1c53c83
2c6e34e
%files -n python3-%{pypi_name}
e2df308
%doc README.rst
e2df308
%license LICENSE
06ee977
%{_bindir}/generate-subunit
e2df308
%{_bindir}/ostestr
e2df308
%{_bindir}/subunit-trace
e2df308
%{_bindir}/subunit2html
2c6e34e
%{python3_sitelib}/os_testr
2c6e34e
%{python3_sitelib}/os_testr-*.egg-info
e2df308
1c53c83
%if 0%{?with_doc}
1c53c83
%files -n python-%{pypi_name}-doc
e2df308
%license LICENSE
a82a82f
%doc doc/build/html
1c53c83
%endif
e2df308
e2df308
%changelog
f072cec
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-2
f072cec
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
f072cec
2c6e34e
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 2.0.0-1
2c6e34e
- Update to upstream version 2.0.0
2c6e34e
688d672
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 1.1.0-4
688d672
- Rebuilt for Python 3.9
688d672
70b4dca
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.0-3
70b4dca
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
70b4dca
1c53c83
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 1.1.0-2
1c53c83
- Update to upstream version 1.1.0
1c53c83
1329f3d
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-4
1329f3d
- Rebuilt for Python 3.8.0rc1 (#1748018)
1329f3d
0235cbf
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.0-3
0235cbf
- Rebuilt for Python 3.8
0235cbf
c56b9f9
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0-2
c56b9f9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
c56b9f9
07c1330
* Sat Feb 10 2018 RDO <dev@lists.rdoproject.org> 1.0.0-1
07c1330
- Update to 1.0.0
Alan Pevec 7848fa6