diff --git a/.gitignore b/.gitignore index 7eaa0ab..91601cb 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ /oslo.i18n-3.17.0.tar.gz /oslo.i18n-3.19.0.tar.gz /oslo.i18n-3.23.1.tar.gz +/oslo.i18n-3.24.0.tar.gz diff --git a/python-oslo-i18n.spec b/python-oslo-i18n.spec index e59a345..ca9f753 100644 --- a/python-oslo-i18n.spec +++ b/python-oslo-i18n.spec @@ -1,9 +1,18 @@ +# Macros for py2/py3 compatibility +%if 0%{?fedora} || 0%{?rhel} > 7 +%global pyver %{python3_pkgversion} +%else +%global pyver 2 +%endif +%global pyver_bin python%{pyver} +%global pyver_sitelib %python%{pyver}_sitelib +%global pyver_install %py%{pyver}_install +%global pyver_build %py%{pyver}_build +# End of macros for py2/py3 compatibility %{!?upstream_version: %global upstream_version %{version}%{?milestone}} %global pypi_name oslo.i18n %global pkg_name oslo-i18n - - %global with_doc 1 %global common_desc \ @@ -12,8 +21,8 @@ The oslo.i18n library contain utilities for working with internationalization \ or library. Name: python-oslo-i18n -Version: 3.23.1 -Release: 5%{?dist} +Version: 3.24.0 +Release: 2%{?dist} Summary: OpenStack i18n library License: ASL 2.0 URL: https://github.com/openstack/%{pypi_name} @@ -26,36 +35,34 @@ BuildRequires: git %description %{common_desc} -%package -n python3-oslo-i18n -Summary: OpenStack i18n Python 3 library -%{?python_provide:%python_provide python3-oslo-i18n} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -BuildRequires: python3-pbr -BuildRequires: python3-babel -BuildRequires: python3-six -BuildRequires: python3-fixtures - -Requires: python3-babel -Requires: python3-six +%package -n python%{pyver}-%{pkg_name} +Summary: OpenStack i18n Python 2 library +%{?python_provide:%python_provide python%{pyver}-%{pkg_name}} + +BuildRequires: python%{pyver}-devel +BuildRequires: python%{pyver}-setuptools +BuildRequires: python%{pyver}-pbr +BuildRequires: python%{pyver}-babel +BuildRequires: python%{pyver}-six +BuildRequires: python%{pyver}-fixtures +# Required to compile translation files +BuildRequires: python%{pyver}-babel + +Requires: python%{pyver}-babel +Requires: python%{pyver}-six Requires: python-%{pkg_name}-lang = %{version}-%{release} -%description -n python3-oslo-i18n +%description -n python%{pyver}-%{pkg_name} %{common_desc} %if 0%{?with_doc} -%package -n python-oslo-i18n-doc +%package -n python-%{pkg_name}-doc Summary: Documentation for OpenStack i18n library -Provides: python2-oslo-i18n-doc = %{version}-%{release} -Provides: python3-oslo-i18n-doc = %{version}-%{release} -Obsoletes: python2-oslo-i18n-doc <= 3.9.0-1 -Obsoletes: python3-oslo-i18n-doc <= 3.9.0-1 +BuildRequires: python%{pyver}-sphinx +BuildRequires: python%{pyver}-openstackdocstheme -BuildRequires: python3-sphinx -BuildRequires: python3-openstackdocstheme - -%description -n python-oslo-i18n-doc +%description -n python-%{pkg_name}-doc Documentation for the oslo.i18n library. %endif @@ -73,17 +80,17 @@ rm -rf *.egg-info rm -rf *requirements.txt %build -%py3_build +%{pyver_build} # Generate i18n files -%{__python3} setup.py compile_catalog -d build/lib/oslo_i18n/locale +%{pyver_bin} setup.py compile_catalog -d build/lib/oslo_i18n/locale %install -%py3_install +%{pyver_install} %if 0%{?with_doc} -%{__python3} setup.py build_sphinx --build-dir . -b html -# remove the sphinx-build-3 leftovers +%{pyver_bin} setup.py build_sphinx --build-dir . -b html +# remove the sphinx-build-%{pyver} leftovers rm -rf html/.{doctrees,buildinfo} # Fix this rpmlint warning @@ -92,22 +99,21 @@ sed -i "s|\r||g" html/_static/jquery.js # Install i18n .mo files (.po and .pot are not required) install -d -m 755 %{buildroot}%{_datadir} -rm -f %{buildroot}%{python3_sitelib}/oslo_i18n/locale/*/LC_*/oslo_i18n*po -rm -f %{buildroot}%{python3_sitelib}/oslo_i18n/locale/*pot -mv %{buildroot}%{python3_sitelib}/oslo_i18n/locale %{buildroot}%{_datadir}/locale -rm -rf %{buildroot}%{python3_sitelib}/oslo_i18n/locale +rm -f %{buildroot}%{pyver_sitelib}/oslo_i18n/locale/*/LC_*/oslo_i18n*po +rm -f %{buildroot}%{pyver_sitelib}/oslo_i18n/locale/*pot +mv %{buildroot}%{pyver_sitelib}/oslo_i18n/locale %{buildroot}%{_datadir}/locale # Find language files %find_lang oslo_i18n --all-name -%files -n python3-oslo-i18n +%files -n python%{pyver}-%{pkg_name} %doc ChangeLog CONTRIBUTING.rst PKG-INFO README.rst %license LICENSE -%{python3_sitelib}/oslo_i18n -%{python3_sitelib}/*.egg-info +%{pyver_sitelib}/oslo_i18n +%{pyver_sitelib}/*.egg-info %if 0%{?with_doc} -%files -n python-oslo-i18n-doc +%files -n python-%{pkg_name}-doc %license LICENSE %doc html %endif @@ -116,6 +122,9 @@ rm -rf %{buildroot}%{python3_sitelib}/oslo_i18n/locale %license LICENSE %changelog +* Wed Nov 06 2019 Alfredo Moralejo 3.24.0-2 +- Update to upstream version 3.24.0 + * Thu Oct 03 2019 Miro HronĨok - 3.23.1-5 - Rebuilt for Python 3.8.0rc1 (#1748018) diff --git a/sources b/sources index fe9858a..c88a4f8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (oslo.i18n-3.23.1.tar.gz) = 82ebcf54d7edbd7c3e7c1d7e13b223ca9cf88aae717ee6fa0c2fb9b423ef88403b42b3360cfd7b8dd3b6d973a077a1458fc9c879efbb6006a1cedc6ade35397b +SHA512 (oslo.i18n-3.24.0.tar.gz) = 0891612e19af62a967a7fd7e504f68870011c03fec0be89e9456d64504eb86ace762e10bd187aa860dc883f171e7672d8c8f75e8ae5713f9d7a407dc9009a19f