e38fe8f
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
598acc2
%global sources_gpg_sign 0x815afec729392386480e076dcc0dfe2d21c023c9
Mark McLoughlin a2d74aa
%global sname oslo.config
Alan Pevec e7dba62
%global pypi_name oslo-config
a22da23
# doc and tests are enabled by default unless %%repo_bootstrap
a22da23
%bcond doc %[!0%{?repo_bootstrap}]
a22da23
%bcond tests %[!0%{?repo_bootstrap}]
e7bd0d9
Alan Pevec e7dba62
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
598acc2
# we are excluding some BRs from automatic generator
598acc2
%global excluded_brs doc8 bandit pre-commit hacking flake8-import-order
a22da23
%if %{without doc}
598acc2
# Exclude sphinx from BRs if docs are disabled
598acc2
%global excluded_brs %{excluded_brs} sphinx openstackdocstheme
a22da23
%if %{without tests}
a22da23
# Exclude oslo.log from BRs if docs and tests are disabled
598acc2
%global excluded_brs %{excluded_brs} oslo.log
598acc2
%endif
a22da23
%endif
Alan Pevec e7dba62
Mark McLoughlin 69c6541
Name:       python-oslo-config
Alan Pevec 7611173
Epoch:      2
598acc2
Version:    9.2.0
01fe563
Release:    3%{?dist}
Mark McLoughlin 69c6541
Summary:    OpenStack common configuration library
Mark McLoughlin 69c6541
e7bd0d9
Group:      Development/Languages
598acc2
License:    Apache-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
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
950d7af
Obsoletes: python2-%{pypi_name} < %{version}-%{release}
950d7af
e46718d
BuildRequires: python3-devel
598acc2
BuildRequires: pyproject-rpm-macros
91f0861
BuildRequires: git-core
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
a22da23
%if %{with doc}
950d7af
%package -n python-%{pypi_name}-doc
950d7af
Summary:    Documentation for OpenStack common configuration library
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
e7bd0d9
# Remove tests requiring sphinx if sphinx is not available
a22da23
%if %{with doc} == 0
e7bd0d9
rm oslo_config/tests/test_sphinxext.py
e7bd0d9
rm oslo_config/tests/test_sphinxconfiggen.py
e7bd0d9
%endif
Mark McLoughlin 69c6541
598acc2
sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini
598acc2
sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps =/" tox.ini
598acc2
sed -i /^minversion.*/d tox.ini
598acc2
sed -i /^requires.*virtualenv.*/d tox.ini
598acc2
598acc2
# Exclude some bad-known BRs
598acc2
for pkg in %{excluded_brs}; do
598acc2
  for reqfile in doc/requirements.txt test-requirements.txt; do
598acc2
    if [ -f $reqfile ]; then
598acc2
      sed -i /^${pkg}.*/d $reqfile
598acc2
    fi
598acc2
  done
598acc2
done
598acc2
598acc2
# Automatic BR generation
598acc2
%generate_buildrequires
a22da23
%pyproject_buildrequires %{?with_doc:-e docs} %{?with_tests:-e %{default_toxenv}}
598acc2
e7bd0d9
%build
598acc2
%pyproject_wheel
Mark McLoughlin 69c6541
a22da23
%if %{with doc}
598acc2
%tox -e docs
e46718d
# remove the sphinx-build-3 leftovers
4ca7d75
rm -rf doc/build/html/.{doctrees,buildinfo}
e7bd0d9
%endif
e7bd0d9
e7bd0d9
%install
598acc2
%pyproject_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
a22da23
%if %{with tests}
598acc2
%tox -e %{default_toxenv}
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
598acc2
%{python3_sitelib}/*.dist-info
950d7af
a22da23
%if %{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
01fe563
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2:9.2.0-3
01fe563
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
01fe563
10155cf
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2:9.2.0-2
10155cf
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
10155cf
598acc2
* Wed Oct 25 2023 Alfredo Moralejo <amoralej@gmail.com> 2:9.2.0-1
598acc2
- Update to upstream version 9.2.0
598acc2
0c9c0e2
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2:9.1.1-3
0c9c0e2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
0c9c0e2
1e64d35
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 2:9.1.1-2
1e64d35
- Rebuilt for Python 3.12
1e64d35
c6663b9
* Fri Apr 14 2023 Karolina Kula <kkula@redhat.com> 2:9.1.1-1
c6663b9
- Update to upstream version 9.1.1
c6663b9
1f0ac9c
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2:9.0.0-2
1f0ac9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
1f0ac9c
e448c7a
* Thu Nov 17 2022 Alfredo Moralejo <amoralej@redhat.com> 2:9.0.0-1
e448c7a
- Update to upstream version 9.0.0
e448c7a
b8d0741
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2:8.8.0-3
b8d0741
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
b8d0741
0748485
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 2:8.8.0-2
0748485
- Rebuilt for Python 3.11
0748485
d3f9789
* Wed May 18 2022 Joel Capitao <jcapitao@redhat.com> 2:8.8.0-1
d3f9789
- Update to upstream version 8.8.0
d3f9789
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