%global pypi_name oslotest
# Bootstrapping stein
%global repo_bootstrap 1
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%if 0%{?repo_bootstrap} == 0
%global with_doc 1
%else
%global with_doc 0
%endif
%global common_desc OpenStack test framework and test fixtures.
Name: python-%{pypi_name}
Version: 3.7.1
Release: 4%{?dist}
Summary: OpenStack test framework
License: ASL 2.0
URL: http://launchpad.net/oslo
Source0: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: git
%description
%{common_desc}
%package -n python3-%{pypi_name}
Summary: OpenStack test framework
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
# test requires
BuildRequires: python3-six
BuildRequires: python3-stestr
BuildRequires: python3-mock
BuildRequires: python3-mox3
BuildRequires: python3-debtcollector
%if 0%{?repo_bootstrap} == 0
BuildRequires: python3-os-client-config
BuildRequires: python3-oslo-config
%endif
Requires: python3-debtcollector >= 1.2.0
Requires: python3-fixtures
%if 0%{?repo_bootstrap} == 0
Requires: python3-os-client-config
%endif
Requires: python3-six
Requires: python3-subunit
Requires: python3-stestr
Requires: python3-testtools
Requires: python3-mock
Requires: python3-mox3 >= 0.20.0
%description -n python3-%{pypi_name}
%{common_desc}
%if 0%{?with_doc}
%package -n python-%{pypi_name}-doc
Summary: Documentation for the OpenStack test framework
BuildRequires: python3-sphinx
%description -n python-%{pypi_name}-doc
%{common_desc} Documentation
%endif
%prep
%autosetup -n %{pypi_name}-%{upstream_version} -S git
# let RPM handle deps
rm -rf {test-,}requirements.txt
%build
%{__python3} setup.py build
%if 0%{?with_doc}
# generate html docs
%{__python3} setup.py build_sphinx -b html
# remove the sphinx-build-3 leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%endif
%install
%{__python3} setup.py install --skip-build --root %{buildroot}
mv %{buildroot}%{_bindir}/oslo_run_cross_tests \
%{buildroot}%{_bindir}/python3-oslo_run_cross_tests
mv %{buildroot}%{_bindir}/oslo_run_pre_release_tests \
%{buildroot}%{_bindir}/python3-oslo_run_pre_release_tests
mv %{buildroot}%{_bindir}/oslo_debug_helper \
%{buildroot}%{_bindir}/python3-oslo_debug_helper
%check
%if 0%{?repo_bootstrap} == 0
%{__python3} setup.py test
%endif
%files -n python3-%{pypi_name}
%license LICENSE
%{_bindir}/python3-oslo_run_cross_tests
%{_bindir}/python3-oslo_run_pre_release_tests
%{_bindir}/python3-oslo_debug_helper
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}*.egg-info
%if 0%{?with_doc}
%files -n python-%{pypi_name}-doc
%license LICENSE
%doc doc/build/html
%doc README.rst
%endif
%changelog
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-4
- Rebuilt for Python 3.8.0rc1 (#1748018)
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.7.1-3
- Rebuilt for Python 3.8
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.7.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 3.7.1-1
- Update to 3.7.1