Blame python-oslo-log.spec

2527827
1e675e1
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
4195ac5
%global with_doc 1
214fb1d
%global pypi_name oslo.log
1e675e1
%global pkg_name oslo-log
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
2527827
Version:        3.42.3
45be505
Release:        3%{?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
214fb1d
BuildArch:      noarch
214fb1d
4195ac5
%if 0%{?with_doc}
1e675e1
%package -n python-%{pkg_name}-doc
214fb1d
Summary:    Documentation for the Oslo Log handling library
214fb1d
338b88b
BuildRequires:  python3-sphinx
338b88b
BuildRequires:  python3-openstackdocstheme
214fb1d
1e675e1
%description -n python-%{pkg_name}-doc
214fb1d
Documentation for the Oslo Log handling library.
4195ac5
%endif
214fb1d
2a41025
%package -n python3-%{pkg_name}-tests
2a41025
Summary:    Tests for the Oslo Log handling library
2a41025
2a41025
Requires:       python3-%{pkg_name} = %{version}-%{release}
2a41025
Requires:       python3-mock
2a41025
Requires:       python3-oslotest
2527827
Requires:       python3-oslo-config >= 2:5.2.0
2a41025
Requires:       python3-subunit
2a41025
Requires:       python3-testrepository
2a41025
Requires:       python3-testscenarios
2a41025
Requires:       python3-testtools
2a41025
2a41025
%description -n python3-%{pkg_name}-tests
4195ac5
%{common_desc1}
2a41025
1e675e1
%package -n python3-%{pkg_name}
1e675e1
Summary:        OpenStack Oslo Log library
1e675e1
%{?python_provide:%python_provide python3-%{pkg_name}}
1e675e1
1e675e1
BuildRequires:  python3-devel
1e675e1
BuildRequires:  python3-pbr
1e675e1
# Required for tests
1e675e1
BuildRequires:  python3-dateutil
1e675e1
BuildRequires:  python3-mock
1e675e1
BuildRequires:  python3-oslotest
1e675e1
BuildRequires:  python3-oslo-config
2527827
BuildRequires:  python3-oslo-context
1e675e1
BuildRequires:  python3-oslo-serialization
1e675e1
BuildRequires:  python3-subunit
1e675e1
BuildRequires:  python3-testrepository
1e675e1
BuildRequires:  python3-testscenarios
1e675e1
BuildRequires:  python3-testtools
1e675e1
BuildRequires:  python3-inotify
1e675e1
4195ac5
Requires:       python3-pbr
1e675e1
Requires:       python3-dateutil
a78f962
Requires:       python3-monotonic
2527827
Requires:       python3-six >= 1.11.0
2527827
Requires:       python3-oslo-config >= 2:5.2.0
2527827
Requires:       python3-oslo-context >= 2.20.0
2527827
Requires:       python3-oslo-i18n >= 3.20.0
2527827
Requires:       python3-oslo-utils >= 3.36.0
2527827
Requires:       python3-oslo-serialization >= 2.25.0
1e675e1
Requires:       python3-debtcollector
1e675e1
Requires:       python3-inotify
124d7f8
Requires:       python-%{pkg_name}-lang = %{version}-%{release}
1e675e1
1e675e1
%description -n python3-%{pkg_name}
1e675e1
Oslo concurrency library has utilities for safely running multi-thread,
1e675e1
multi-process applications using locking mechanisms and for running
1e675e1
external processes.
1e675e1
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
feccee0
%autosetup -n %{pypi_name}-%{upstream_version} -S git
214fb1d
# Let RPM handle the dependencies
1e675e1
rm -rf {test-,}requirements.txt
214fb1d
214fb1d
%build
1e675e1
%py3_build
214fb1d
4195ac5
%if 0%{?with_doc}
214fb1d
# generate html docs
2527827
PYTHONPATH=. sphinx-build-3 -W -b html doc/source doc/build/html
2527827
# remove the sphinx-build-3 leftovers
4195ac5
rm -rf doc/build/html/.{doctrees,buildinfo}
4195ac5
%endif
124d7f8
# Generate i18n files
338b88b
%{__python3} setup.py compile_catalog -d build/lib/oslo_log/locale
214fb1d
214fb1d
%install
1e675e1
%py3_install
2527827
ln -s ./convert-json %{buildroot}%{_bindir}/convert-json-3
2527827
ln -s ./convert-json %{buildroot}%{_bindir}/convert-json-%{python3_version}
2527827
2527827
124d7f8
# Install i18n .mo files (.po and .pot are not required)
124d7f8
install -d -m 755 %{buildroot}%{_datadir}
338b88b
rm -f %{buildroot}%{python3_sitelib}/oslo_log/locale/*/LC_*/oslo_log*po
338b88b
rm -f %{buildroot}%{python3_sitelib}/oslo_log/locale/*pot
338b88b
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
2527827
rm -rf .testrepository
2527827
# Ignore unit tests until https://bugs.launchpad.net/oslo.log/+bug/1783630 is fixed
2527827
%{__python3} setup.py test||:
214fb1d
4195ac5
%if 0%{?with_doc}
1e675e1
%files -n python-%{pkg_name}-doc
4195ac5
%doc doc/build/html
214fb1d
%license LICENSE
4195ac5
%endif
214fb1d
124d7f8
%files -n python-%{pkg_name}-lang -f oslo_log.lang
a78f962
%license LICENSE
124d7f8
1e675e1
%files -n python3-%{pkg_name}
1e675e1
%doc README.rst ChangeLog AUTHORS
1e675e1
%license LICENSE
1e675e1
%{python3_sitelib}/oslo_log
1e675e1
%{python3_sitelib}/*.egg-info
338b88b
%{_bindir}/convert-json
2527827
%{_bindir}/convert-json-3
2527827
%{_bindir}/convert-json-%{python3_version}
1e675e1
%exclude %{python3_sitelib}/oslo_log/tests
8ea0137
2a41025
%files -n python3-%{pkg_name}-tests
2a41025
%{python3_sitelib}/oslo_log/tests
2a41025
2a41025
1e675e1
%changelog
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