|
|
@ -1,37 +1,63 @@
|
|
|
|
%global srcname Babel
|
|
|
|
%global srcname Babel
|
|
|
|
%global sum Library for internationalizing Python applications
|
|
|
|
%global sum Library for internationalizing Python applications
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%bcond_without python3
|
|
|
|
|
|
|
|
%bcond_with python36_module
|
|
|
|
|
|
|
|
|
|
|
|
# There is some bootstrapping involved when upgrading Python 3
|
|
|
|
# There is some bootstrapping involved when upgrading Python 3
|
|
|
|
# First of all we need babel (this package) to use sphinx
|
|
|
|
# First of all we need babel (this package) to use sphinx
|
|
|
|
# And pytest is at this point not yet ready
|
|
|
|
# And pytest is at this point not yet ready
|
|
|
|
%bcond_with bootstrap
|
|
|
|
%global bootstrap 0
|
|
|
|
|
|
|
|
|
|
|
|
Name: babel
|
|
|
|
Name: babel
|
|
|
|
Version: 2.9.1
|
|
|
|
Version: 2.5.1
|
|
|
|
Release: 2%{?dist}
|
|
|
|
Release: 10%{?dist}
|
|
|
|
Summary: Tools for internationalizing Python applications
|
|
|
|
Summary: Tools for internationalizing Python applications
|
|
|
|
|
|
|
|
|
|
|
|
License: BSD
|
|
|
|
License: BSD
|
|
|
|
URL: https://babel.pocoo.org/
|
|
|
|
URL: http://babel.pocoo.org/
|
|
|
|
Source0: %{pypi_source}
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/B/%{srcname}/%{srcname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
Patch0: babel-2.3.4-remove-pytz-version.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Remove dependency on an exotic testing package python-freezegun which we
|
|
|
|
|
|
|
|
# don't have capacity to ship in RHEL8
|
|
|
|
|
|
|
|
Patch1: Skip-tests-involving-freezegun-module-which-we-re-no.patch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Fix CVE-2021-20095: relative path traversal allows an attacker to load
|
|
|
|
|
|
|
|
# arbitrary locale files on disk and execute arbitrary code
|
|
|
|
|
|
|
|
# Resolved upstream: https://github.com/python-babel/babel/pull/782/
|
|
|
|
|
|
|
|
# CVE bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1955615
|
|
|
|
|
|
|
|
Patch2: CVE-2021-20095.patch
|
|
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
|
|
|
BuildRequires: python2-pytz
|
|
|
|
|
|
|
|
BuildRequires: python2-pytest
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
|
|
|
%if %{with python36_module}
|
|
|
|
|
|
|
|
BuildRequires: python36-devel
|
|
|
|
|
|
|
|
%else
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
|
|
|
%endif
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
%if !%{with bootstrap}
|
|
|
|
%if !%{bootstrap}
|
|
|
|
BuildRequires: python3-pytz
|
|
|
|
BuildRequires: python3-pytz
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
# build the documentation
|
|
|
|
# build the documentation
|
|
|
|
BuildRequires: make
|
|
|
|
BuildRequires: make
|
|
|
|
|
|
|
|
%if !%{bootstrap}
|
|
|
|
%if !%{with bootstrap}
|
|
|
|
|
|
|
|
BuildRequires: python3-sphinx
|
|
|
|
BuildRequires: python3-sphinx
|
|
|
|
%endif
|
|
|
|
%endif # bootstrap
|
|
|
|
Requires: python3-babel
|
|
|
|
%endif # python3
|
|
|
|
Requires: python3-setuptools
|
|
|
|
|
|
|
|
|
|
|
|
Requires: python2-babel
|
|
|
|
|
|
|
|
Requires: python2-setuptools
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
%description
|
|
|
@ -43,7 +69,24 @@ Babel is composed of two major parts:
|
|
|
|
providing access to various locale display names, localized number
|
|
|
|
providing access to various locale display names, localized number
|
|
|
|
and date formatting, etc.
|
|
|
|
and date formatting, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python2-babel
|
|
|
|
|
|
|
|
Summary: %sum
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Requires: python2-setuptools
|
|
|
|
|
|
|
|
Requires: python2-pytz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%{?python_provide:%python_provide python2-babel}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%description -n python2-babel
|
|
|
|
|
|
|
|
Babel is composed of two major parts:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* tools to build and work with gettext message catalogs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* a Python interface to the CLDR (Common Locale Data Repository),
|
|
|
|
|
|
|
|
providing access to various locale display names, localized number
|
|
|
|
|
|
|
|
and date formatting, etc.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
%package -n python3-babel
|
|
|
|
%package -n python3-babel
|
|
|
|
Summary: %sum
|
|
|
|
Summary: %sum
|
|
|
|
|
|
|
|
|
|
|
@ -61,26 +104,30 @@ Babel is composed of two major parts:
|
|
|
|
providing access to various locale display names, localized number
|
|
|
|
providing access to various locale display names, localized number
|
|
|
|
and date formatting, etc.
|
|
|
|
and date formatting, etc.
|
|
|
|
|
|
|
|
|
|
|
|
%if !%{with bootstrap}
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
%package doc
|
|
|
|
Summary: Documentation for Babel
|
|
|
|
Summary: Documentation for Babel
|
|
|
|
Provides: python-babel-doc = %{version}-%{release}
|
|
|
|
Provides: python-babel-doc = %{version}-%{release}
|
|
|
|
|
|
|
|
Provides: python2-babel-doc = %{version}-%{release}
|
|
|
|
Provides: python3-babel-doc = %{version}-%{release}
|
|
|
|
Provides: python3-babel-doc = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
|
|
%description doc
|
|
|
|
%description doc
|
|
|
|
Documentation for Babel
|
|
|
|
Documentation for Babel
|
|
|
|
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n %{srcname}-%{version}
|
|
|
|
%autosetup -n %{srcname}-%{version} -p1
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
%build
|
|
|
|
|
|
|
|
%py2_build
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
%py3_build
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
|
|
|
|
%if !%{bootstrap}
|
|
|
|
BUILDDIR="$PWD/built-docs"
|
|
|
|
BUILDDIR="$PWD/built-docs"
|
|
|
|
rm -rf "$BUILDDIR"
|
|
|
|
rm -rf "$BUILDDIR"
|
|
|
|
|
|
|
|
|
|
|
|
%if !%{with bootstrap}
|
|
|
|
|
|
|
|
pushd docs
|
|
|
|
pushd docs
|
|
|
|
make \
|
|
|
|
make \
|
|
|
|
SPHINXBUILD=sphinx-build-3 \
|
|
|
|
SPHINXBUILD=sphinx-build-3 \
|
|
|
@ -89,129 +136,77 @@ make \
|
|
|
|
popd
|
|
|
|
popd
|
|
|
|
rm -f "$BUILDDIR/html/.buildinfo"
|
|
|
|
rm -f "$BUILDDIR/html/.buildinfo"
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%install
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
%py3_install
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%py2_install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mv %{buildroot}%{_bindir}/pybabel{,-%{python2_version}}
|
|
|
|
|
|
|
|
ln -s pybabel-%{python2_version} %{buildroot}%{_bindir}/pybabel-2
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
%check
|
|
|
|
export TZ=UTC
|
|
|
|
export TZ=America/New_York
|
|
|
|
%if !%{with bootstrap}
|
|
|
|
%{__python2} -m pytest
|
|
|
|
# tests/messages/test_frontend.py and tests/test_dates require freezegun
|
|
|
|
%if %{with python3}
|
|
|
|
%{__python3} -m pytest --ignore tests/messages/test_frontend.py --ignore tests/test_dates.py
|
|
|
|
%if !%{bootstrap}
|
|
|
|
|
|
|
|
%{__python3} -m pytest
|
|
|
|
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
%files
|
|
|
|
%doc CHANGES AUTHORS
|
|
|
|
%doc CHANGES AUTHORS
|
|
|
|
%license LICENSE
|
|
|
|
%license LICENSE
|
|
|
|
%{_bindir}/pybabel
|
|
|
|
%{_bindir}/pybabel-2
|
|
|
|
|
|
|
|
%{_bindir}/pybabel-%{python2_version}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files -n python2-babel
|
|
|
|
|
|
|
|
%{python2_sitelib}/Babel-%{version}-py*.egg-info
|
|
|
|
|
|
|
|
%{python2_sitelib}/babel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%if %{with python3}
|
|
|
|
%files -n python3-babel
|
|
|
|
%files -n python3-babel
|
|
|
|
%{python3_sitelib}/Babel-%{version}-py*.egg-info/
|
|
|
|
%{python3_sitelib}/Babel-%{version}-py*.egg-info
|
|
|
|
%{python3_sitelib}/babel/
|
|
|
|
%{python3_sitelib}/babel
|
|
|
|
|
|
|
|
|
|
|
|
%if !%{with bootstrap}
|
|
|
|
%if !%{bootstrap}
|
|
|
|
%files doc
|
|
|
|
%files doc
|
|
|
|
%doc built-docs/html/*
|
|
|
|
%doc built-docs/html/*
|
|
|
|
%endif
|
|
|
|
%endif # bootstrap
|
|
|
|
|
|
|
|
%endif # python3
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
%changelog
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.1-2
|
|
|
|
* Wed May 12 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.5.1-10
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
- Fix CVE-2021-20095
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri May 21 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.9.1-1
|
|
|
|
|
|
|
|
- Update to 2.9.1.
|
|
|
|
|
|
|
|
- Fixes CVE-2021-20095
|
|
|
|
|
|
|
|
Resolves: rhbz#1955615
|
|
|
|
Resolves: rhbz#1955615
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.0-6
|
|
|
|
* Thu Apr 25 2019 Tomas Orsava <torsava@redhat.com> - 2.5.1-9
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
- Bumping due to problems with modular RPM upgrade path
|
|
|
|
|
|
|
|
- Resolves: rhbz#1695587
|
|
|
|
* Tue Apr 13 2021 Miro Hrončok <mhroncok@redhat.com> - 2.9.0-5
|
|
|
|
|
|
|
|
- Drop build dependency on python-freezegun
|
|
|
|
|
|
|
|
- Resolves: rhbz#1947517
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-4
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Dec 21 2020 Miro Hrončok <mhroncok@redhat.com> - 2.9.0-3
|
|
|
|
|
|
|
|
- Disable Python 2 build entirely
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Nov 24 2020 Miro Hrončok <mhroncok@redhat.com>
|
|
|
|
|
|
|
|
- Disable Python 2 build on RHEL 9+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Nov 16 22:22:25 CET 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.9.0-1
|
|
|
|
|
|
|
|
- update to 2.9.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-7
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 2.8.0-6
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.8.0-5
|
|
|
|
|
|
|
|
- Bootstrap for Python 3.9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri May 08 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.8.0-4
|
|
|
|
|
|
|
|
- reenable Python 2 subpackage for Fedora 33+ (rhbz #1737930)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue May 05 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.8.0-3
|
|
|
|
|
|
|
|
- add patch for compatibility with Python 3.9a6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-2
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jan 02 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.8.0-1
|
|
|
|
|
|
|
|
- update to upstream version 2.8.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Oct 31 2019 Nils Philippsen <nils@tiptoe.de> - 2.7.0-7
|
|
|
|
|
|
|
|
- drop python2-babel only from F33 on as it is needed for trac (for the time
|
|
|
|
|
|
|
|
being, #1737930)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Oct 31 2019 Nils Philippsen <nils@tiptoe.de> - 2.7.0-6
|
|
|
|
|
|
|
|
- drop python2-babel from F32 on
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Sep 13 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-5
|
|
|
|
|
|
|
|
- Reduce Python 2 build dependencies on Fedora 32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-4
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-3
|
|
|
|
|
|
|
|
- Bootstrap for Python 3.8
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0-2
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon May 27 2019 Felix Schwarz <fschwarz@fedoraproject.org> - 2.7.0-1
|
|
|
|
|
|
|
|
- update to upstream version 2.7.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-6
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-5
|
|
|
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-4
|
|
|
|
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-3
|
|
|
|
* Tue Oct 02 2018 Lumír Balhar <lbalhar@redhat.com> - 2.5.1-8
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
- Fix unversioned requires/buildrequires
|
|
|
|
|
|
|
|
- Resolves: rhbz#1628242
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jun 29 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 2.6.0-2
|
|
|
|
* Wed Aug 08 2018 Lumír Balhar <lbalhar@redhat.com> - 2.5.1-7
|
|
|
|
- add setting to build without Python 2 support
|
|
|
|
- Remove unversioned binaries
|
|
|
|
|
|
|
|
- Resolves: rhbz#1613343
|
|
|
|
|
|
|
|
|
|
|
|
* Fri Jun 29 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 2.6.0-1
|
|
|
|
* Tue Jul 31 2018 Lumír Balhar <lbalhar@redhat.com> - 2.5.1-6
|
|
|
|
- update to upstream version 2.6.0
|
|
|
|
- Make possible to disable python3 subpackage
|
|
|
|
|
|
|
|
|
|
|
|
* Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-5
|
|
|
|
* Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-5
|
|
|
|
- Run tests in pytest (as declared in BuildRequires)
|
|
|
|
- Remove dependency on an exotic testing package python-freezegun which we
|
|
|
|
|
|
|
|
don't have capacity to ship in RHEL8
|
|
|
|
|
|
|
|
- Run tests in pytest (as declared in BuildRequires) instead of unittest
|
|
|
|
|
|
|
|
|
|
|
|
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-4
|
|
|
|
* Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-4
|
|
|
|
- Rebuilt for Python 3.7
|
|
|
|
- Build the documentation always using the Python 3 version Sphinx
|
|
|
|
|
|
|
|
|
|
|
|
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-3
|
|
|
|
* Tue May 01 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-3
|
|
|
|
- Bootstrap for Python 3.7
|
|
|
|
- Require the python36-devel package when building for the python36 module
|
|
|
|
|
|
|
|
|
|
|
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
|
|
|
|
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
|