938c5ae
%{!?sources_gpg: %{!?dlrn:%global sources_gpg 1} }
938c5ae
%global sources_gpg_sign 0x2426b928085a020d8a90d0d879ab7008d0896c8a
2527827
1e675e1
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
a7eb79d
4195ac5
%global with_doc 1
214fb1d
%global pypi_name oslo.log
1e675e1
%global pkg_name oslo-log
a7eb79d
4195ac5
%global common_desc \
4195ac5
OpenStack logging configuration library provides standardized configuration \
4195ac5
for all openstack projects. It also provides custom formatters, handlers and \
4195ac5
support for context specific logging (like resource id’s etc).
4195ac5
4195ac5
%global common_desc1 \
4195ac5
Tests for the Oslo Log handling library.
214fb1d
214fb1d
Name:           python-oslo-log
938c5ae
Version:        4.4.0
37d2b9c
Release:        2%{?dist}
214fb1d
Summary:        OpenStack Oslo Log library
214fb1d
214fb1d
License:        ASL 2.0
214fb1d
URL:            http://launchpad.net/oslo
a78f962
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
938c5ae
# Required for tarball sources verification
938c5ae
%if 0%{?sources_gpg} == 1
938c5ae
Source101:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz.asc
938c5ae
Source102:        https://releases.openstack.org/_static/%{sources_gpg_sign}.txt
938c5ae
%endif
214fb1d
BuildArch:      noarch
214fb1d
938c5ae
# Required for tarball sources verification
938c5ae
%if 0%{?sources_gpg} == 1
938c5ae
BuildRequires:  /usr/bin/gpgv2
938c5ae
%endif
938c5ae
6240eca
%package -n python3-%{pkg_name}
a7eb79d
Summary:        OpenStack Oslo Log library
6240eca
%{?python_provide:%python_provide python3-%{pkg_name}}
a7eb79d
Obsoletes: python2-%{pkg_name} < %{version}-%{release}
a7eb79d
6240eca
BuildRequires:  python3-devel
6240eca
BuildRequires:  python3-pbr
a7eb79d
BuildRequires:  git
a7eb79d
# Required for tests
6240eca
BuildRequires:  python3-dateutil
6240eca
BuildRequires:  python3-mock
6240eca
BuildRequires:  python3-oslotest
6240eca
BuildRequires:  python3-oslo-context
6240eca
BuildRequires:  python3-oslo-config
6240eca
BuildRequires:  python3-oslo-serialization
6240eca
BuildRequires:  python3-subunit
6240eca
BuildRequires:  python3-testtools
6240eca
BuildRequires:  python3-testrepository
6240eca
BuildRequires:  python3-testscenarios
a7eb79d
# Required to compile translation files
6240eca
BuildRequires:  python3-babel
6240eca
BuildRequires:  python3-inotify
6240eca
6240eca
Requires:       python3-pbr
6240eca
Requires:       python3-dateutil
6240eca
Requires:       python3-oslo-config >= 2:5.2.0
6240eca
Requires:       python3-oslo-context >= 2.20.0
6240eca
Requires:       python3-oslo-i18n >= 3.20.0
6240eca
Requires:       python3-oslo-utils >= 3.36.0
6240eca
Requires:       python3-oslo-serialization >= 2.25.0
6240eca
Requires:       python3-debtcollector >= 1.19.0
6240eca
Requires:       python3-inotify
a7eb79d
a7eb79d
Requires:       python-%{pkg_name}-lang = %{version}-%{release}
a7eb79d
6240eca
%description -n python3-%{pkg_name}
a7eb79d
%{common_desc}
a7eb79d
4195ac5
%if 0%{?with_doc}
1e675e1
%package -n python-%{pkg_name}-doc
214fb1d
Summary:    Documentation for the Oslo Log handling library
214fb1d
6240eca
BuildRequires:  python3-sphinx
6240eca
BuildRequires:  python3-openstackdocstheme
6240eca
BuildRequires:  python3-oslo-config
6240eca
BuildRequires:  python3-oslo-utils
214fb1d
1e675e1
%description -n python-%{pkg_name}-doc
214fb1d
Documentation for the Oslo Log handling library.
4195ac5
%endif
214fb1d
6240eca
%package -n python3-%{pkg_name}-tests
2a41025
Summary:    Tests for the Oslo Log handling library
2a41025
6240eca
Requires:       python3-%{pkg_name} = %{version}-%{release}
6240eca
Requires:       python3-mock
6240eca
Requires:       python3-oslotest
6240eca
Requires:       python3-oslo-config >= 2:5.2.0
6240eca
Requires:       python3-subunit
6240eca
Requires:       python3-testtools
6240eca
Requires:       python3-testrepository
6240eca
Requires:       python3-testscenarios
2a41025
6240eca
%description -n python3-%{pkg_name}-tests
4195ac5
%{common_desc1}
2a41025
1e675e1
%description
4195ac5
%{common_desc}
214fb1d
124d7f8
%package  -n python-%{pkg_name}-lang
124d7f8
Summary:   Translation files for Oslo log library
124d7f8
124d7f8
%description -n python-%{pkg_name}-lang
124d7f8
Translation files for Oslo log library
124d7f8
214fb1d
%prep
938c5ae
# Required for tarball sources verification
938c5ae
%if 0%{?sources_gpg} == 1
938c5ae
%{gpgverify}  --keyring=%{SOURCE102} --signature=%{SOURCE101} --data=%{SOURCE0}
938c5ae
%endif
feccee0
%autosetup -n %{pypi_name}-%{upstream_version} -S git
214fb1d
# Let RPM handle the dependencies
1e675e1
rm -rf {test-,}requirements.txt
214fb1d
214fb1d
%build
6240eca
%{py3_build}
214fb1d
4195ac5
%if 0%{?with_doc}
214fb1d
# generate html docs
6240eca
PYTHONPATH=. sphinx-build-3 -W -b html doc/source doc/build/html
6240eca
# remove the sphinx-build-3 leftovers
4195ac5
rm -rf doc/build/html/.{doctrees,buildinfo}
4195ac5
%endif
124d7f8
# Generate i18n files
938c5ae
python3 setup.py compile_catalog -d build/lib/oslo_log/locale --domain oslo_log
214fb1d
214fb1d
%install
6240eca
%{py3_install}
6240eca
ln -s ./convert-json %{buildroot}%{_bindir}/convert-json-3
2527827
124d7f8
# Install i18n .mo files (.po and .pot are not required)
124d7f8
install -d -m 755 %{buildroot}%{_datadir}
6240eca
rm -f %{buildroot}%{python3_sitelib}/oslo_log/locale/*/LC_*/oslo_log*po
6240eca
rm -f %{buildroot}%{python3_sitelib}/oslo_log/locale/*pot
6240eca
mv %{buildroot}%{python3_sitelib}/oslo_log/locale %{buildroot}%{_datadir}/locale
124d7f8
124d7f8
# Find language files
124d7f8
%find_lang oslo_log --all-name
124d7f8
1e675e1
%check
6240eca
python3 setup.py test
a7eb79d
6240eca
%files -n python3-%{pkg_name}
a7eb79d
%doc README.rst ChangeLog AUTHORS
a7eb79d
%license LICENSE
6240eca
%{python3_sitelib}/oslo_log
6240eca
%{python3_sitelib}/*.egg-info
a7eb79d
%{_bindir}/convert-json
6240eca
%{_bindir}/convert-json-3
6240eca
%exclude %{python3_sitelib}/oslo_log/tests
214fb1d
4195ac5
%if 0%{?with_doc}
1e675e1
%files -n python-%{pkg_name}-doc
4195ac5
%doc doc/build/html
214fb1d
%license LICENSE
4195ac5
%endif
214fb1d
6240eca
%files -n python3-%{pkg_name}-tests
6240eca
%{python3_sitelib}/oslo_log/tests
124d7f8
a7eb79d
%files -n python-%{pkg_name}-lang -f oslo_log.lang
1e675e1
%license LICENSE
2a41025
1e675e1
%changelog
938c5ae
* Wed Oct 28 2020 Alfredo Moralejo <amoralej@redhat.com> 4.4.0-2
938c5ae
- Update to upstream version 4.4.0
938c5ae
37d2b9c
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.1.1-2
37d2b9c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
37d2b9c
6240eca
* Wed Jun 03 2020 Joel Capitao <jcapitao@redhat.com> 4.1.1-1
6240eca
- Update to upstream version 4.1.1
6240eca
3e14d04
* Tue May 26 2020 Miro Hrončok <mhroncok@redhat.com> - 3.44.1-4
3e14d04
- Rebuilt for Python 3.9
3e14d04
63ecfd0
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.44.1-3
63ecfd0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
63ecfd0
a7eb79d
* Wed Nov 06 2019 Alfredo Moralejo <amoralej@redhat.com> 3.44.1-2
a7eb79d
- Update to upstream version 3.44.1
a7eb79d
4ad38e3
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 3.42.3-4
4ad38e3
- Rebuilt for Python 3.8.0rc1 (#1748018)
4ad38e3
45be505
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 3.42.3-3
45be505
- Rebuilt for Python 3.8
45be505
54c8c28
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.42.3-2
54c8c28
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
54c8c28
2527827
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 3.42.3-1
2527827
- Update to 3.42.3
214fb1d