bcc3951
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
d3ac87a
%global sources_gpg_sign 0x815afec729392386480e076dcc0dfe2d21c023c9
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}}
d3ac87a
# we are excluding some BRs from automatic generator
d3ac87a
%global excluded_brs doc8 bandit pre-commit hacking flake8-import-order
d3ac87a
# Exclude sphinx from BRs if docs are disabled
d3ac87a
%if ! 0%{?with_doc}
d3ac87a
%global excluded_brs %{excluded_brs} sphinx openstackdocstheme
d3ac87a
%endif
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
d3ac87a
Version:        6.2.1
5d8f1ef
Release:        3%{?dist}
Alan Pevec 8ff2bad
Summary:        OpenStack Oslo Utility library
Alan Pevec 8ff2bad
d3ac87a
License:        Apache-2.0
Alan Pevec 8ff2bad
URL:            http://launchpad.net/oslo
44ce036
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
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
1f35ab3
1c7d7ff
BuildRequires:  python3-devel
d3ac87a
BuildRequires:  pyproject-rpm-macros
d3ac87a
1f35ab3
Requires:       python-%{pkg_name}-lang = %{version}-%{release}
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
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
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
d3ac87a
d3ac87a
sed -i /^[[:space:]]*-c{env:.*_CONSTRAINTS_FILE.*/d tox.ini
d3ac87a
sed -i "s/^deps = -c{env:.*_CONSTRAINTS_FILE.*/deps =/" tox.ini
d3ac87a
sed -i /^minversion.*/d tox.ini
d3ac87a
sed -i /^requires.*virtualenv.*/d tox.ini
d3ac87a
# we consume pytz from AppStream repo instead of tzdata
d3ac87a
sed -i 's/tzdata.*/pytz/' requirements.txt
d3ac87a
d3ac87a
# Exclude some bad-known BRs
d3ac87a
for pkg in %{excluded_brs};do
d3ac87a
  for reqfile in doc/requirements.txt test-requirements.txt; do
d3ac87a
    if [ -f $reqfile ]; then
d3ac87a
      sed -i /^${pkg}.*/d $reqfile
d3ac87a
    fi
d3ac87a
  done
d3ac87a
done
d3ac87a
d3ac87a
%generate_buildrequires
d3ac87a
%if 0%{?with_doc}
d3ac87a
  %pyproject_buildrequires -t -e %{default_toxenv},docs
d3ac87a
%else
d3ac87a
  %pyproject_buildrequires -t -e %{default_toxenv}
d3ac87a
%endif
Alan Pevec 8ff2bad
Alan Pevec 8ff2bad
%build
d3ac87a
%pyproject_wheel
Alan Pevec 8ff2bad
c210608
%if 0%{?with_doc}
Alan Pevec 8ff2bad
# generate html docs
d3ac87a
%tox -e docs
1c7d7ff
# remove the sphinx-build-3 leftovers
5818d41
rm -rf doc/build/html/.{doctrees,buildinfo}
c210608
%endif
Alan Pevec 8ff2bad
f5880e5
Alan Pevec 8ff2bad
%install
d3ac87a
%pyproject_install
d3ac87a
d3ac87a
# Generate i18n files
d3ac87a
python3 setup.py compile_catalog -d %{buildroot}%{python3_sitelib}/oslo_utils/locale --domain oslo_utils
d3ac87a
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
d3ac87a
%tox -e %{default_toxenv}
Alan Pevec 8ff2bad
1c7d7ff
%files -n python3-%{pkg_name}
c2a3905
%doc README.rst
c2a3905
%license LICENSE
1c7d7ff
%{python3_sitelib}/oslo_utils
d3ac87a
%{python3_sitelib}/*.dist-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
5d8f1ef
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-3
5d8f1ef
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
5d8f1ef
226ebb0
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.1-2
226ebb0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
226ebb0
d3ac87a
* Thu Oct 26 2023 Alfredo Moralejo <amoralej@gmail.com> 6.2.1-1
d3ac87a
- Update to upstream version 6.2.1
d3ac87a
c9a00a8
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.0-3
c9a00a8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
c9a00a8
33f017e
* Mon Jul 03 2023 Python Maint <python-maint@redhat.com> - 6.1.0-2
33f017e
- Rebuilt for Python 3.12
33f017e
6c1c892
* Fri Apr 14 2023 Karolina Kula <kkula@redhat.com> 6.1.0-1
6c1c892
- Update to upstream version 6.1.0
6c1c892
958fdab
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.1-2
958fdab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
958fdab
be8797c
* Thu Nov 17 2022 Alfredo Moralejo <amoralej@redhat.com> 6.0.1-1
be8797c
- Update to upstream version 6.0.1
be8797c
f983d85
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.12.2-4
f983d85
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
f983d85
67a4d9b
* Tue Jul 19 2022 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 4.12.2-3
67a4d9b
- Rebuilt for pyparsing-3.0.9
67a4d9b
b023c11
* Thu Jun 16 2022 Python Maint <python-maint@redhat.com> - 4.12.2-2
b023c11
- Rebuilt for Python 3.11
b023c11
538859a
* Thu May 19 2022 Joel Capitao <jcapitao@redhat.com> 4.12.2-1
538859a
- Update to upstream version 4.12.2
538859a
1609e04
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.8.0-4
1609e04
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
1609e04
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