From 124d7f85a265d60caaaf290279077b1a67bf71d7 Mon Sep 17 00:00:00 2001 From: Haikel Guemar Date: Sep 07 2016 00:46:47 +0000 Subject: Sync w/ RDO Newton Change-Id: I111ec248e0a0fad0eef02b5a526c1988ad2892fd --- diff --git a/Changelog.old b/Changelog.old index b19dfa5..30ba02c 100644 --- a/Changelog.old +++ b/Changelog.old @@ -1,3 +1,12 @@ +* Tue Jul 19 2016 Fedora Release Engineering - 3.2.0-3 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Wed Jun 01 2016 Charalampos Stratakis 3.2.0-2 +- Provide a python 3 tests subpackage + +* Tue Mar 22 2016 Haikel Guemar 3.2.0-1 +- Update to 3.2.0 + * Thu Feb 04 2016 Fedora Release Engineering - 1.11.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/python-oslo-log.spec b/python-oslo-log.spec index a40f0e2..f1d2d27 100644 --- a/python-oslo-log.spec +++ b/python-oslo-log.spec @@ -8,13 +8,13 @@ %global pkg_name oslo-log Name: python-oslo-log -Version: 3.2.0 -Release: 3%{?dist} +Version: 3.16.0 +Release: 1%{?dist} Summary: OpenStack Oslo Log library License: ASL 2.0 URL: http://launchpad.net/oslo -Source0: https://pypi.python.org/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Source0: https://pypi.io/packages/source/o/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %package -n python2-%{pkg_name} @@ -34,6 +34,8 @@ BuildRequires: python-testrepository BuildRequires: python-testscenarios BuildRequires: python-testtools BuildRequires: python-inotify +# Required to compile translation files +BuildRequires: python-babel Requires: python-babel Requires: python-dateutil @@ -45,6 +47,7 @@ Requires: python-oslo-utils Requires: python-oslo-serialization Requires: python-debtcollector Requires: python-inotify +Requires: python-%{pkg_name}-lang = %{version}-%{release} %description -n python2-%{pkg_name} OpenStack logging configuration library provides standardized configuration @@ -124,6 +127,7 @@ Requires: python3-oslo-utils Requires: python3-oslo-serialization Requires: python3-debtcollector Requires: python3-inotify +Requires: python-%{pkg_name}-lang = %{version}-%{release} %description -n python3-%{pkg_name} Oslo concurrency library has utilities for safely running multi-thread, @@ -136,6 +140,12 @@ OpenStack logging configuration library provides standardized configuration for all openstack projects. It also provides custom formatters, handlers and support for context specific logging (like resource id’s etc). +%package -n python-%{pkg_name}-lang +Summary: Translation files for Oslo log library + +%description -n python-%{pkg_name}-lang +Translation files for Oslo log library + %prep %setup -q -n %{pypi_name}-%{upstream_version} # Let RPM handle the dependencies @@ -151,6 +161,8 @@ rm -rf {test-,}requirements.txt PYTHONPATH=. sphinx-build doc/source html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} +# Generate i18n files +%{__python2} setup.py compile_catalog -d build/lib/oslo_log/locale %install %py2_install @@ -158,6 +170,18 @@ rm -rf html/.{doctrees,buildinfo} %py3_install %endif +# Install i18n .mo files (.po and .pot are not required) +install -d -m 755 %{buildroot}%{_datadir} +rm -f %{buildroot}%{python2_sitelib}/oslo_log/locale/*/LC_*/oslo_log*po +rm -f %{buildroot}%{python2_sitelib}/oslo_log/locale/*pot +mv %{buildroot}%{python2_sitelib}/oslo_log/locale %{buildroot}%{_datadir}/locale +%if 0%{?with_python3} +rm -rf %{buildroot}%{python3_sitelib}/oslo_log/locale +%endif + +# Find language files +%find_lang oslo_log --all-name + %check %{__python2} setup.py test %if 0%{?with_python3} @@ -179,6 +203,8 @@ rm -rf .testrepository %files -n python2-%{pkg_name}-tests %{python2_sitelib}/oslo_log/tests +%files -n python-%{pkg_name}-lang -f oslo_log.lang + %if 0%{?with_python3} %files -n python3-%{pkg_name} %doc README.rst ChangeLog AUTHORS @@ -195,12 +221,6 @@ rm -rf .testrepository %changelog -* Tue Jul 19 2016 Fedora Release Engineering - 3.2.0-3 -- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages - -* Wed Jun 01 2016 Charalampos Stratakis 3.2.0-2 -- Provide a python 3 tests subpackage - -* Tue Mar 22 2016 Haikel Guemar 3.2.0-1 -- Update to 3.2.0 +* Tue Sep 06 2016 Haikel Guemar 3.16.0-1 +- Update to 3.16.0