e38fe8f
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
91f0861
%global sources_gpg_sign 0x5d2d1e4fb8d38e6af76c50d53d4fec30cf5ce3da
Mark McLoughlin a2d74aa
%global sname oslo.config
Alan Pevec e7dba62
%global pypi_name oslo-config
e7bd0d9
%global with_doc 1
e7bd0d9
%global repo_bootstrap 1
e7bd0d9
Alan Pevec e7dba62
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Alan Pevec e7dba62
Mark McLoughlin 69c6541
Name:       python-oslo-config
Alan Pevec 7611173
Epoch:      2
91f0861
Version:    8.5.0
1902555
Release:    4%{?dist}
Mark McLoughlin 69c6541
Summary:    OpenStack common configuration library
Mark McLoughlin 69c6541
e7bd0d9
Group:      Development/Languages
Mark McLoughlin 69c6541
License:    ASL 2.0
4ca7d75
URL:        https://launchpad.net/%{sname}
4ca7d75
Source0:    https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz
e38fe8f
# Required for tarball sources verification
e38fe8f
%if 0%{?sources_gpg} == 1
e38fe8f
Source101:        https://tarballs.openstack.org/%{sname}/%{sname}-%{upstream_version}.tar.gz.asc
e38fe8f
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
e38fe8f
%endif
Alan Pevec 2e821d2
af6f3ae
Patch0001: 0001-add-usr-share-project-dist.conf-to-the-default-confi.patch
Mark McLoughlin 69c6541
Mark McLoughlin 69c6541
BuildArch:  noarch
Alan Pevec e7dba62
e38fe8f
# Required for tarball sources verification
e38fe8f
%if 0%{?sources_gpg} == 1
e38fe8f
BuildRequires:  /usr/bin/gpgv2
e38fe8f
%endif
e38fe8f
Alan Pevec e7dba62
%description
Alan Pevec e7dba62
The Oslo project intends to produce a python library containing
Alan Pevec e7dba62
infrastructure code shared by OpenStack projects. The APIs provided
Alan Pevec e7dba62
by the project should be high quality, stable, consistent and generally
Alan Pevec e7dba62
useful.
Alan Pevec e7dba62
Alan Pevec e7dba62
The oslo-config library is a command line and configuration file
Alan Pevec e7dba62
parsing library from the Oslo project.
Alan Pevec e7dba62
e46718d
%package -n python3-%{pypi_name}
950d7af
Summary:    OpenStack common configuration library
e46718d
%{?python_provide:%python_provide python3-%{pypi_name}}
950d7af
Obsoletes: python2-%{pypi_name} < %{version}-%{release}
950d7af
91f0861
%if (0%{?fedora} && 0%{?fedora} < 32) || (0%{?rhel} && 0%{?rhel} < 9)
91f0861
Requires:   python3-importlib-metadata >= 1.7.0
91f0861
%endif
e46718d
Requires:   python3-oslo-i18n >= 3.15.3
e46718d
Requires:   python3-rfc3986 >= 1.2.0
e46718d
Requires:   python3-pbr
e46718d
Requires:   python3-requests >= 2.18.0
e46718d
Requires:   python3-stevedore >= 1.20.0
e46718d
Requires:   python3-debtcollector >= 1.2.0
e46718d
Requires:   python3-netaddr >= 0.7.18
91f0861
Requires:   python3-yaml >= 5.1
e46718d
e46718d
BuildRequires: python3-devel
e46718d
BuildRequires: python3-setuptools
e46718d
BuildRequires: python3-oslo-i18n
e46718d
BuildRequires: python3-rfc3986
e46718d
BuildRequires: python3-pbr
91f0861
BuildRequires: git-core
66d9fd1
# Required for tests
91f0861
%if (0%{?fedora} && 0%{?fedora} < 32) || (0%{?rhel} && 0%{?rhel} < 9)
91f0861
BuildRequires: python3-importlib-metadata
91f0861
%endif
e46718d
BuildRequires: python3-testscenarios
e46718d
BuildRequires: python3-stestr
e46718d
BuildRequires: python3-testtools
e46718d
BuildRequires: python3-oslotest
e46718d
BuildRequires: python3-requests-mock
e46718d
BuildRequires: python3-netaddr
e46718d
BuildRequires: python3-stevedore
e46718d
BuildRequires: python3-PyYAML
e7bd0d9
e7bd0d9
%if 0%{?repo_bootstrap} == 0
e46718d
BuildRequires: python3-oslo-log
e7bd0d9
%endif
49e0694
e46718d
%description -n python3-%{pypi_name}
49e0694
The Oslo project intends to produce a python library containing
49e0694
infrastructure code shared by OpenStack projects. The APIs provided
49e0694
by the project should be high quality, stable, consistent and generally
49e0694
useful.
49e0694
49e0694
The oslo-config library is a command line and configuration file
49e0694
parsing library from the Oslo project.
49e0694
950d7af
%if 0%{?with_doc}
950d7af
%package -n python-%{pypi_name}-doc
950d7af
Summary:    Documentation for OpenStack common configuration library
950d7af
e46718d
BuildRequires: python3-sphinx
e46718d
BuildRequires: python3-fixtures
e46718d
BuildRequires: python3-openstackdocstheme
e46718d
BuildRequires: python3-oslotest >= 1.10.0
e46718d
BuildRequires: python3-debtcollector
e46718d
BuildRequires: python3-stevedore
e46718d
BuildRequires: python3-sphinxcontrib-apidoc
950d7af
950d7af
%description -n python-%{pypi_name}-doc
950d7af
Documentation for the oslo-config library.
950d7af
%endif
950d7af
Mark McLoughlin 69c6541
%prep
e38fe8f
# Required for tarball sources verification
e38fe8f
%if 0%{?sources_gpg} == 1
e38fe8f
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
e38fe8f
%endif
66d9fd1
%autosetup -n %{sname}-%{upstream_version} -S git
e7bd0d9
# Remove shebang from non executable file, it's used by the oslo-config-validator binary.
e7bd0d9
sed -i '/\/usr\/bin\/env/d' oslo_config/validator.py
Mark McLoughlin 69c6541
# let RPM handle deps
Alan Pevec e7dba62
rm -rf {test-,}requirements.txt
Mark McLoughlin 69c6541
e7bd0d9
# Remove tests requiring sphinx if sphinx is not available
e7bd0d9
%if 0%{?with_doc} == 0
e7bd0d9
rm oslo_config/tests/test_sphinxext.py
e7bd0d9
rm oslo_config/tests/test_sphinxconfiggen.py
e7bd0d9
%endif
Mark McLoughlin 69c6541
e7bd0d9
%build
e46718d
%{py3_build}
Mark McLoughlin 69c6541
e7bd0d9
%if 0%{?with_doc}
e7bd0d9
export PYTHONPATH=.
e46718d
sphinx-build-3 -b html doc/source doc/build/html
e46718d
# remove the sphinx-build-3 leftovers
4ca7d75
rm -rf doc/build/html/.{doctrees,buildinfo}
e7bd0d9
%endif
e7bd0d9
e7bd0d9
%install
e46718d
%{py3_install}
e7bd0d9
pushd %{buildroot}/%{_bindir}
e7bd0d9
for i in generator validator
e7bd0d9
do
e46718d
ln -s oslo-config-$i oslo-config-$i-3
e7bd0d9
done
e7bd0d9
popd
Mark McLoughlin 69c6541
Mark McLoughlin 69c6541
%check
e7bd0d9
%if 0%{?repo_bootstrap} == 0
e38fe8f
# Skip test_generator_raises_error until https://review.opendev.org/#/c/742589/ is in tag release
e38fe8f
PYTHON=python3 stestr-3 run --black-regex test_generator_raises_error
e7bd0d9
%endif
Mark McLoughlin 69c6541
e46718d
%files -n python3-%{pypi_name}
950d7af
%doc README.rst
950d7af
%license LICENSE
950d7af
%{_bindir}/oslo-config-generator
e46718d
%{_bindir}/oslo-config-generator-3
950d7af
%{_bindir}/oslo-config-validator
e46718d
%{_bindir}/oslo-config-validator-3
e46718d
%{python3_sitelib}/oslo_config
e46718d
%{python3_sitelib}/*.egg-info
950d7af
e7bd0d9
%if 0%{?with_doc}
300cf4f
%files -n python-%{pypi_name}-doc
4ca7d75
%doc doc/build/html
Alan Pevec e7dba62
%license LICENSE
e7bd0d9
%endif
Mark McLoughlin 69c6541
Mark McLoughlin 69c6541
%changelog
1902555
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2:8.5.0-4
1902555
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
1902555
a239d16
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:8.5.0-3
a239d16
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
a239d16
1349478
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2:8.5.0-2
1349478
- Rebuilt for Python 3.10
1349478
91f0861
* Wed Mar 17 2021 Joel Capitao <jcapitao@redhat.com> 2:8.5.0-1
91f0861
- Update to upstream version 8.5.0
91f0861
cc6ef79
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2:8.3.2-3
cc6ef79
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
cc6ef79
e38fe8f
* Wed Oct 21 2020 Joel Capitao <jcapitao@redhat.com> 2:8.3.2-2
e38fe8f
- Enable sources tarball validation using GPG signature.
e38fe8f
e38fe8f
* Thu Sep 17 2020 RDO <dev@lists.rdoproject.org> 2:8.3.2-1
e38fe8f
- Update to 8.3.2
e38fe8f
0af6a20
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2:8.0.2-2
0af6a20
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
0af6a20
e46718d
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 2:8.0.2-1
e46718d
- Update to upstream version 8.0.2
e46718d
aab7d2f
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 2:6.11.1-4
aab7d2f
- Rebuilt for Python 3.9
aab7d2f
cd52d22
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2:6.11.1-3
cd52d22
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
cd52d22
950d7af
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 2:6.11.1-2
950d7af
- Update to upstream version 6.11.1
950d7af
d1fb612
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 2:6.8.1-5
d1fb612
- Rebuilt for Python 3.8.0rc1 (#1748018)
d1fb612
8986a67
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 2:6.8.1-4
8986a67
- Rebuilt for Python 3.8
8986a67
7ad411f
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2:6.8.1-3
7ad411f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
7ad411f
300cf4f
* Thu May 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2:6.8.1-2
300cf4f
- Rename the documentation package back to python-oslo-config-doc
300cf4f
e7bd0d9
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 2:6.8.1-1
e7bd0d9
- Update to 6.8.1
Mark McLoughlin d04d838