bcc3951
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
9785321
%global sources_gpg_sign 0x5d2d1e4fb8d38e6af76c50d53d4fec30cf5ce3da
Alan Pevec 8ff2bad
%global pypi_name oslo.utils
764dfae
%global pkg_name oslo-utils
c210608
%global with_doc 1
c210608
Alan Pevec adb05a9
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
Alan Pevec adb05a9
db5b49a
%global common_desc \
db5b49a
The OpenStack Oslo Utility library. \
db5b49a
* Documentation: http://docs.openstack.org/developer/oslo.utils \
db5b49a
* Source: http://git.openstack.org/cgit/openstack/oslo.utils \
db5b49a
* Bugs: http://bugs.launchpad.net/oslo
db5b49a
db5b49a
%global common_desc_tests Tests for the Oslo Utility library.
db5b49a
Alan Pevec 8ff2bad
Name:           python-oslo-utils
9785321
Version:        4.8.0
502f414
Release:        3%{?dist}
Alan Pevec 8ff2bad
Summary:        OpenStack Oslo Utility library
Alan Pevec 8ff2bad
Alan Pevec 8ff2bad
License:        ASL 2.0
Alan Pevec 8ff2bad
URL:            http://launchpad.net/oslo
44ce036
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
f132a6b
Patch001:       0001-Switch_to_collections_abc.patch
bcc3951
# Required for tarball sources verification
bcc3951
%if 0%{?sources_gpg} == 1
bcc3951
Source101:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz.asc
bcc3951
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
bcc3951
%endif
Alan Pevec 8ff2bad
BuildArch:      noarch
Alan Pevec 8ff2bad
bcc3951
# Required for tarball sources verification
bcc3951
%if 0%{?sources_gpg} == 1
bcc3951
BuildRequires:  /usr/bin/gpgv2
bcc3951
%endif
bcc3951
9785321
BuildRequires:  git-core
db5b49a
c2a3905
%description
db5b49a
%{common_desc}
c2a3905
1c7d7ff
%package -n python3-%{pkg_name}
1f35ab3
Summary:    OpenStack Oslo Utility library
1c7d7ff
%{?python_provide:%python_provide python3-%{pkg_name}}
1f35ab3
1c7d7ff
BuildRequires:  python3-devel
1c7d7ff
BuildRequires:  python3-pbr
1c7d7ff
BuildRequires:  python3-iso8601
1c7d7ff
BuildRequires:  python3-debtcollector
1f35ab3
# test requirements
1c7d7ff
BuildRequires:  python3-eventlet
bcc3951
BuildRequires:  python3-hacking
1c7d7ff
BuildRequires:  python3-fixtures
1c7d7ff
BuildRequires:  python3-oslotest
1c7d7ff
BuildRequires:  python3-testtools
1c7d7ff
BuildRequires:  python3-ddt
1c7d7ff
BuildRequires:  python3-oslo-i18n
1c7d7ff
BuildRequires:  python3-pyparsing
1c7d7ff
BuildRequires:  python3-testscenarios
1c7d7ff
BuildRequires:  python3-testrepository
1c7d7ff
BuildRequires:  python3-netaddr
bcc3951
BuildRequires:  python3-packaging
bcc3951
BuildRequires:  python3-yaml
1f35ab3
# Required to compile translation files
1c7d7ff
BuildRequires:  python3-babel
1c7d7ff
BuildRequires:  python3-netifaces
1c7d7ff
BuildRequires:  python3-pytz
1c7d7ff
1c7d7ff
Requires:       python3-oslo-i18n >= 3.15.3
1c7d7ff
Requires:       python3-iso8601
1c7d7ff
Requires:       python3-debtcollector >= 1.2.0
1c7d7ff
Requires:       python3-pyparsing
1c7d7ff
Requires:       python3-netaddr >= 0.7.18
1c7d7ff
Requires:       python3-pytz
1c7d7ff
Requires:       python3-netifaces >= 0.10.4
bcc3951
Requires:       python3-packaging >= 20.4
1f35ab3
Requires:       python-%{pkg_name}-lang = %{version}-%{release}
9785321
Requires:       python3-pbr >= 2.0.0
1f35ab3
1c7d7ff
%description -n python3-%{pkg_name}
1f35ab3
%{common_desc}
1f35ab3
c210608
%if 0%{?with_doc}
764dfae
%package -n python-%{pkg_name}-doc
Alan Pevec 23a31e5
Summary:    Documentation for the Oslo Utility library
Alan Pevec 8ff2bad
1c7d7ff
BuildRequires:  python3-sphinx
1c7d7ff
BuildRequires:  python3-openstackdocstheme
Alan Pevec 8ff2bad
764dfae
%description -n python-%{pkg_name}-doc
Alan Pevec 23a31e5
Documentation for the Oslo Utility library.
c210608
%endif
Alan Pevec 8ff2bad
1c7d7ff
%package -n python3-%{pkg_name}-tests
6462f15
Summary:    Tests for the Oslo Utility library
6462f15
1c7d7ff
Requires: python3-%{pkg_name} = %{version}-%{release}
1c7d7ff
Requires: python3-eventlet
bcc3951
Requires: python3-hacking
1c7d7ff
Requires: python3-fixtures
1c7d7ff
Requires: python3-oslotest
1c7d7ff
Requires: python3-testtools
1c7d7ff
Requires: python3-ddt
1c7d7ff
Requires: python3-testscenarios
1c7d7ff
Requires: python3-testrepository
1f35ab3
1c7d7ff
%description -n python3-%{pkg_name}-tests
1f35ab3
%{common_desc_tests}
c2a3905
f5880e5
%package  -n python-%{pkg_name}-lang
f5880e5
Summary:   Translation files for Oslo utils library
f5880e5
f5880e5
%description -n python-%{pkg_name}-lang
f5880e5
Translation files for Oslo utils library
f5880e5
Alan Pevec 8ff2bad
%prep
bcc3951
# Required for tarball sources verification
bcc3951
%if 0%{?sources_gpg} == 1
bcc3951
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
bcc3951
%endif
5818d41
%autosetup -n %{pypi_name}-%{upstream_version} -S git
Alan Pevec b5a2e8e
332c7d5
# Let RPM handle the dependencies
c210608
rm -rf *requirements.txt
Alan Pevec 8ff2bad
Alan Pevec 8ff2bad
%build
1c7d7ff
%{py3_build}
Alan Pevec 8ff2bad
c210608
%if 0%{?with_doc}
Alan Pevec 8ff2bad
# generate html docs
9785321
sphinx-build-3 -W -b html doc/source doc/build/html
1c7d7ff
# remove the sphinx-build-3 leftovers
5818d41
rm -rf doc/build/html/.{doctrees,buildinfo}
c210608
%endif
Alan Pevec 8ff2bad
f5880e5
# Generate i18n files
bcc3951
python3 setup.py compile_catalog -d build/lib/oslo_utils/locale --domain oslo_utils
f5880e5
Alan Pevec 8ff2bad
%install
1c7d7ff
%{py3_install}
Alan Pevec 8ff2bad
f5880e5
# Install i18n .mo files (.po and .pot are not required)
f5880e5
install -d -m 755 %{buildroot}%{_datadir}
1c7d7ff
rm -f %{buildroot}%{python3_sitelib}/oslo_utils/locale/*/LC_*/oslo_utils*po
1c7d7ff
rm -f %{buildroot}%{python3_sitelib}/oslo_utils/locale/*pot
1c7d7ff
mv %{buildroot}%{python3_sitelib}/oslo_utils/locale %{buildroot}%{_datadir}/locale
f5880e5
f5880e5
# Find language files
f5880e5
%find_lang oslo_utils --all-name
f5880e5
764dfae
%check
9785321
python3 setup.py test
Alan Pevec 8ff2bad
1c7d7ff
%files -n python3-%{pkg_name}
c2a3905
%doc README.rst
c2a3905
%license LICENSE
1c7d7ff
%{python3_sitelib}/oslo_utils
1c7d7ff
%{python3_sitelib}/*.egg-info
1c7d7ff
%exclude %{python3_sitelib}/oslo_utils/tests
c2a3905
c210608
%if 0%{?with_doc}
764dfae
%files -n python-%{pkg_name}-doc
5818d41
%doc doc/build/html
c2a3905
%license LICENSE
c210608
%endif
Alan Pevec c4aade8
1c7d7ff
%files -n python3-%{pkg_name}-tests
1c7d7ff
%{python3_sitelib}/oslo_utils/tests
1f35ab3
f5880e5
%files -n python-%{pkg_name}-lang -f oslo_utils.lang
44ce036
%license LICENSE
f5880e5
764dfae
%changelog
502f414
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-3
502f414
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
502f414
d107dd7
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 4.8.0-2
d107dd7
- Rebuilt for Python 3.10
d107dd7
9785321
* Mon Mar 22 2021 Joel Capitao <jcapitao@redhat.com> 4.8.0-1
9785321
- Update to upstream version 4.8.0
9785321
1e062ae
* Wed Feb 10 2021 Charalampos Stratakis <cstratak@redhat.com> - 4.6.0-4
1e062ae
- Remove redundant python-funcsigs depdendency
1e062ae
44a5caa
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.6.0-3
44a5caa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
44a5caa
bcc3951
* Wed Oct 21 2020 Joel Capitao <jcapitao@redhat.com> 4.6.0-2
bcc3951
- Enable sources tarball validation using GPG signature.
bcc3951
bcc3951
* Thu Sep 17 2020 RDO <dev@lists.rdoproject.org> 4.6.0-1
bcc3951
- Update to 4.6.0
bcc3951
3ed1db0
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-2
3ed1db0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
3ed1db0
1c7d7ff
* Wed Jun 10 2020 Joel Capitao <jcapitao@redhat.com> 4.1.1-1
1c7d7ff
- Update to upstream version 4.1.1
1c7d7ff
6807b73
* Mon Jun 01 2020 Javier Peña <jpena@redhat.com> - 3.41.1-5
6807b73
- Remove python-hacking from requirements, it is not actually needed for the build
6807b73
00faae2
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.41.1-4
00faae2
- Rebuilt for Python 3.9
00faae2
8671cb6
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.41.1-3
8671cb6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
8671cb6
1f35ab3
* Thu Nov 07 2019 Alfredo Moralejo <amoralej@redhat.com> 3.41.1-2
1f35ab3
- Update to upstream version 3.41.1
1f35ab3
d2303da
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.40.3-5
d2303da
- Rebuilt for Python 3.8.0rc1 (#1748018)
d2303da
3eb1e84
* Wed Aug 21 2019 Alfredo Moralejo <amoralej@redhat.com> 3.40.3-4
3eb1e84
- Add digestmod when using hmac - Resolves rhbz#1743899
3eb1e84
- Disabled failing unit test with python 3.8.
3eb1e84
5884244
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.40.3-3
5884244
- Rebuilt for Python 3.8
5884244
65a8fc6
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.40.3-2
65a8fc6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
65a8fc6
c210608
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 3.40.3-1
c210608
- Update to 3.40.3
504b6af