%global sname oslo.config
%global pypi_name oslo-config
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Name: python-oslo-config
Epoch: 2
Version: 5.2.0
Release: 5%{?dist}
Summary: OpenStack common configuration library
License: ASL 2.0
URL: https://launchpad.net/%{sname}
Source0: https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz
Patch0001: 0001-add-usr-share-project-dist.conf-to-the-default-confi.patch
BuildArch: noarch
%description
The Oslo project intends to produce a python library containing
infrastructure code shared by OpenStack projects. The APIs provided
by the project should be high quality, stable, consistent and generally
useful.
The oslo-config library is a command line and configuration file
parsing library from the Oslo project.
%package -n python-%{pypi_name}-doc
Summary: Documentation for OpenStack common configuration library
BuildRequires: python3-fixtures
BuildRequires: python3-openstackdocstheme
BuildRequires: python3-oslotest >= 1.10.0
BuildRequires: python3-sphinx
BuildRequires: python3-stevedore
BuildRequires: python3-netaddr
BuildRequires: python3-pyyaml
%description -n python-%{pypi_name}-doc
Documentation for the oslo-config library.
%package -n python3-%{pypi_name}
Summary: OpenStack common configuration library
%{?python_provide:%python_provide python3-%{pypi_name}}
Obsoletes: python2-%{pypi_name} < %{version}-%{release}
Requires: python3-netaddr >= 0.7.18
Requires: python3-oslo-i18n >= 3.15.3
Requires: python3-rfc3986 >= 0.3.1
Requires: python3-pbr
Requires: python3-six >= 1.10.0
Requires: python3-stevedore >= 1.20.0
Requires: python3-debtcollector >= 1.2.0
Requires: python3-PyYAML >= 3.10
BuildRequires: python3-devel
BuildRequires: python3-oslo-i18n
BuildRequires: python3-rfc3986
BuildRequires: python3-pbr
BuildRequires: python3-setuptools
BuildRequires: git
# Required for tests
BuildRequires: python3-fixtures
BuildRequires: python3-netaddr
BuildRequires: python3-openstackdocstheme
BuildRequires: python3-oslotest >= 1.10.0
BuildRequires: python3-six >= 1.10.0
BuildRequires: python3-stevedore
BuildRequires: python3-PyYAML
%description -n python3-%{pypi_name}
The Oslo project intends to produce a python library containing
infrastructure code shared by OpenStack projects. The APIs provided
by the project should be high quality, stable, consistent and generally
useful.
The oslo-config library is a command line and configuration file
parsing library from the Oslo project.
%prep
%autosetup -n %{sname}-%{upstream_version} -S git
# let RPM handle deps
rm -rf {test-,}requirements.txt
%build
%{__python3} setup.py build
%install
%{__python3} setup.py install -O1 --skip-build --root %{buildroot}
%{__python3} setup.py build_sphinx -b html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%check
%{__python3} setup.py test || :
%files -n python-%{pypi_name}-doc
%doc doc/build/html
%license LICENSE
%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{_bindir}/oslo-config-generator
%{python3_sitelib}/oslo_config
%{python3_sitelib}/*.egg-info
%changelog
* Fri Feb 15 2019 Yatin Karel <ykarel@redhat.com> - 2:5.2.0-5
- Drop python2 sub package
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:5.2.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:5.2.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Miro HronĨok <mhroncok@redhat.com> - 2:5.2.0-2
- Rebuilt for Python 3.7
* Sat Feb 10 2018 RDO <dev@lists.rdoproject.org> 2:5.2.0-1
- Update to 5.2.0