96744b
%global srcname Babel
96744b
%global sum Library for internationalizing Python applications
96744b
96744b
# There is some bootstrapping involved when upgrading Python 3
96744b
# First of all we need babel (this package) to use sphinx
96744b
# And pytest is at this point not yet ready
96744b
%bcond_with bootstrap
96744b
96744b
Name:           babel
96744b
Version:        2.9.1
96744b
Release:        2%{?dist}
96744b
Summary:        Tools for internationalizing Python applications
96744b
96744b
License:        BSD
96744b
URL:            https://babel.pocoo.org/
96744b
Source0:        %{pypi_source}
96744b
96744b
BuildArch:      noarch
96744b
96744b
BuildRequires:  python3-devel
96744b
BuildRequires:  python3-setuptools
96744b
%if !%{with bootstrap}
96744b
BuildRequires:  python3-pytz
96744b
BuildRequires:  python3-pytest
96744b
%endif
96744b
96744b
# build the documentation
96744b
BuildRequires:  make
96744b
96744b
%if !%{with bootstrap}
96744b
BuildRequires:  python3-sphinx
96744b
%endif
96744b
Requires:       python3-babel
96744b
Requires:       python3-setuptools
96744b
96744b
96744b
%description
96744b
Babel is composed of two major parts:
96744b
96744b
* tools to build and work with gettext message catalogs
96744b
96744b
* a Python interface to the CLDR (Common Locale Data Repository),
96744b
  providing access to various locale display names, localized number
96744b
  and date formatting, etc.
96744b
96744b
96744b
%package -n python3-babel
96744b
Summary:        %sum
96744b
96744b
Requires:       python3-setuptools
96744b
Requires:       python3-pytz
96744b
96744b
%{?python_provide:%python_provide python3-babel}
96744b
96744b
%description -n python3-babel
96744b
Babel is composed of two major parts:
96744b
96744b
* tools to build and work with gettext message catalogs
96744b
96744b
* a Python interface to the CLDR (Common Locale Data Repository),
96744b
  providing access to various locale display names, localized number
96744b
  and date formatting, etc.
96744b
96744b
%if !%{with bootstrap}
96744b
%package doc
96744b
Summary:        Documentation for Babel
96744b
Provides:       python-babel-doc = %{version}-%{release}
96744b
Provides:       python3-babel-doc = %{version}-%{release}
96744b
96744b
%description doc
96744b
Documentation for Babel
96744b
%endif
96744b
96744b
%prep
96744b
%autosetup -p1 -n %{srcname}-%{version}
96744b
96744b
%build
96744b
%py3_build
96744b
96744b
BUILDDIR="$PWD/built-docs"
96744b
rm -rf "$BUILDDIR"
96744b
96744b
%if !%{with bootstrap}
96744b
pushd docs
96744b
make \
96744b
    SPHINXBUILD=sphinx-build-3 \
96744b
    BUILDDIR="$BUILDDIR" \
96744b
    html
96744b
popd
96744b
rm -f "$BUILDDIR/html/.buildinfo"
96744b
%endif
96744b
96744b
%install
96744b
%py3_install
96744b
96744b
%check
96744b
export TZ=UTC
96744b
%if !%{with bootstrap}
96744b
# tests/messages/test_frontend.py and tests/test_dates require freezegun
96744b
%{__python3} -m pytest --ignore tests/messages/test_frontend.py --ignore tests/test_dates.py
96744b
%endif
96744b
96744b
%files
96744b
%doc CHANGES AUTHORS
96744b
%license LICENSE
96744b
%{_bindir}/pybabel
96744b
96744b
%files -n python3-babel
96744b
%{python3_sitelib}/Babel-%{version}-py*.egg-info/
96744b
%{python3_sitelib}/babel/
96744b
96744b
%if !%{with bootstrap}
96744b
%files doc
96744b
%doc built-docs/html/*
96744b
%endif
96744b
96744b
%changelog
96744b
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.1-2
96744b
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
96744b
  Related: rhbz#1991688
96744b
96744b
* Fri May 21 2021 Charalampos Stratakis <cstratak@redhat.com> - 2.9.1-1
96744b
- Update to 2.9.1.
96744b
- Fixes CVE-2021-20095
96744b
Resolves: rhbz#1955615
96744b
96744b
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 2.9.0-6
96744b
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
96744b
96744b
* Tue Apr 13 2021 Miro Hrončok <mhroncok@redhat.com> - 2.9.0-5
96744b
- Drop build dependency on python-freezegun
96744b
- Resolves: rhbz#1947517
96744b
96744b
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.0-4
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
96744b
96744b
* Mon Dec 21 2020 Miro Hrončok <mhroncok@redhat.com> - 2.9.0-3
96744b
- Disable Python 2 build entirely
96744b
96744b
* Tue Nov 24 2020 Miro Hrončok <mhroncok@redhat.com>
96744b
- Disable Python 2 build on RHEL 9+
96744b
96744b
* Mon Nov 16 22:22:25 CET 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.9.0-1
96744b
- update to 2.9.0
96744b
96744b
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-7
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
96744b
96744b
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 2.8.0-6
96744b
- Rebuilt for Python 3.9
96744b
96744b
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 2.8.0-5
96744b
- Bootstrap for Python 3.9
96744b
96744b
* Fri May 08 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.8.0-4
96744b
- reenable Python 2 subpackage for Fedora 33+ (rhbz #1737930)
96744b
96744b
* Tue May 05 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.8.0-3
96744b
- add patch for compatibility with Python 3.9a6
96744b
96744b
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.8.0-2
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
96744b
96744b
* Thu Jan 02 2020 Felix Schwarz <fschwarz@fedoraproject.org> - 2.8.0-1
96744b
- update to upstream version 2.8.0
96744b
96744b
* Thu Oct 31 2019 Nils Philippsen <nils@tiptoe.de> - 2.7.0-7
96744b
- drop python2-babel only from F33 on as it is needed for trac (for the time
96744b
  being, #1737930)
96744b
96744b
* Thu Oct 31 2019 Nils Philippsen <nils@tiptoe.de> - 2.7.0-6
96744b
- drop python2-babel from F32 on
96744b
96744b
* Fri Sep 13 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-5
96744b
- Reduce Python 2 build dependencies on Fedora 32
96744b
96744b
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-4
96744b
- Rebuilt for Python 3.8
96744b
96744b
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-3
96744b
- Bootstrap for Python 3.8
96744b
96744b
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0-2
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
96744b
96744b
* Mon May 27 2019 Felix Schwarz <fschwarz@fedoraproject.org> - 2.7.0-1
96744b
- update to upstream version 2.7.0
96744b
96744b
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-6
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
96744b
96744b
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-5
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
96744b
96744b
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-4
96744b
- Rebuilt for Python 3.7
96744b
96744b
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-3
96744b
- Rebuilt for Python 3.7
96744b
96744b
* Fri Jun 29 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 2.6.0-2
96744b
- add setting to build without Python 2 support
96744b
96744b
* Fri Jun 29 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 2.6.0-1
96744b
- update to upstream version 2.6.0
96744b
96744b
* Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-5
96744b
- Run tests in pytest (as declared in BuildRequires)
96744b
96744b
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-4
96744b
- Rebuilt for Python 3.7
96744b
96744b
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-3
96744b
- Bootstrap for Python 3.7
96744b
96744b
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
96744b
96744b
* Fri Dec 15 2017 Felix Schwarz <fschwarz@fedoraproject.org> - 2.5.1-1
96744b
- update to upstream version 2.5.1
96744b
96744b
* Fri Dec 15 2017 Iryna Shcherbina <ishcherb@redhat.com> - 2.3.4-7
96744b
- Update Python 2 dependency declarations to new packaging standards
96744b
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
96744b
96744b
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-6
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
96744b
96744b
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-5
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
96744b
96744b
* Tue Dec 13 2016 Miro Hrončok <mhroncok@redhat.com> - 2.3.4-4
96744b
- Finish bootstrapping for Python 3.6
96744b
96744b
* Tue Dec 13 2016 Miro Hrončok <mhroncok@redhat.com> - 2.3.4-3
96744b
- Rebuild for Python 3.6
96744b
- Add "bootstrap" conditions
96744b
96744b
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.4-2
96744b
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
96744b
96744b
* Tue May 31 2016 Nils Philippsen <nils@redhat.com>
96744b
- fix source URL
96744b
96744b
* Mon Apr 25 2016 Nils Philippsen <nils@redhat.com> - 2.3.4-1
96744b
- version 2.3.4
96744b
- always build Python3 subpackages
96744b
- remove obsolete packaging constructs
96744b
- update to current Python packaging guidelines
96744b
- build docs non-destructively
96744b
- tag license file as %%license
96744b
- use %%python_provide macro only if present
96744b
- update remove-pytz-version patch
96744b
- fix build dependencies
96744b
- set TZ in %%check
96744b
96744b
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-12
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
96744b
96744b
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-11
96744b
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
96744b
96744b
* Fri Nov  6 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-10
96744b
- Also make sure that the babel package that has pybabel depends on the correct
96744b
  packages (python2 packages on F23 or less and python3 packages on F24 and
96744b
  greater.)
96744b
96744b
* Wed Nov  4 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-9
96744b
- Install the python3 version of pybabel on Fedora 24+ to match with Fedora's
96744b
  default python version
96744b
96744b
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-8
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
96744b
96744b
* Wed Dec 17 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-7
96744b
- Remove pytz version requirement in egginfo as it confuses newer setuptools
96744b
96744b
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-6
96744b
- Change python-setuptools-devel BR into python-setuptools
96744b
96744b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-5
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
96744b
96744b
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.3-4
96744b
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
96744b
96744b
* Wed Apr 02 2014 Nils Philippsen <nils@redhat.com> - 1.3-3
96744b
- fix dependencies (#1083470)
96744b
96744b
* Sun Oct 06 2013 Felix Schwarz <fschwarz@fedoraproject.org> - 1.3-2
96744b
- enable python3 subpackage
96744b
96744b
* Wed Oct 02 2013 Felix Schwarz <fschwarz@fedoraproject.org> - 1.3-1
96744b
- update to Babel 1.3
96744b
- disabled %%check as it tries to download the CLDR
96744b
96744b
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-9
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
96744b
96744b
* Wed Jun 26 2013 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.6-8
96744b
- split documentation off to a separate subpackage
96744b
96744b
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-7
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
96744b
96744b
* Thu Oct 18 2012 Nils Philippsen <nils@redhat.com> - 0.9.6-6
96744b
- run tests in %%check
96744b
- add pytz build requirement for tests
96744b
96744b
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.9.6-5
96744b
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
96744b
96744b
* Wed Aug 01 2012 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 0.9.6-4
96744b
- disable building of non-functional python3 subpackage (#761583)
96744b
96744b
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-3
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
96744b
96744b
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
96744b
96744b
* Tue Jun 07 2011 Nils Philippsen <nils@redhat.com> - 0.9.6-1
96744b
- version 0.9.6:
96744b
  * Backport r493-494: documentation typo fixes.
96744b
  * Make the CLDR import script work with Python 2.7.
96744b
  * Fix various typos.
96744b
  * Fixed Python 2.3 compatibility (ticket #146, #233).
96744b
  * Sort output of list-locales.
96744b
  * Make the POT-Creation-Date of the catalog being updated equal to
96744b
    POT-Creation-Date of the template used to update (ticket #148).
96744b
  * Use a more explicit error message if no option or argument (command) is
96744b
    passed to pybabel (ticket #81).
96744b
  * Keep the PO-Revision-Date if it is not the default value (ticket #148).
96744b
  * Make --no-wrap work by reworking --width's default and mimic xgettext's
96744b
    behaviour of always wrapping comments (ticket #145).
96744b
  * Fixed negative offset handling of Catalog._set_mime_headers (ticket #165).
96744b
  * Add --project and --version options for commandline (ticket #173).
96744b
  * Add a __ne__() method to the Local class.
96744b
  * Explicitly sort instead of using sorted() and don't assume ordering
96744b
    (Python 2.3 and Jython compatibility).
96744b
  * Removed ValueError raising for string formatting message checkers if the
96744b
    string does not contain any string formattings (ticket #150).
96744b
  * Fix Serbian plural forms (ticket #213).
96744b
  * Small speed improvement in format_date() (ticket #216).
96744b
  * Fix number formatting for locales where CLDR specifies alt or draft
96744b
    items (ticket #217)
96744b
  * Fix bad check in format_time (ticket #257, reported with patch and tests by
96744b
    jomae)
96744b
  * Fix so frontend.CommandLineInterface.run does not accumulate logging
96744b
    handlers (#227, reported with initial patch by dfraser)
96744b
  * Fix exception if environment contains an invalid locale setting (#200)
96744b
- install python2 rather than python3 executable (#710880)
96744b
96744b
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-4
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
96744b
96744b
* Thu Aug 26 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.5-3
96744b
- Add python3 subpackage
96744b
96744b
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.5-2
96744b
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
96744b
96744b
* Wed Apr  7 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.5-1
96744b
- This release contains a small number of bugfixes over the 0.9.4
96744b
- release.
96744b
-
96744b
- What's New:
96744b
- -----------
96744b
- * Fixed the case where messages containing square brackets would break
96744b
-  with an unpack error
96744b
- * Fuzzy matching regarding plurals should *NOT* be checked against
96744b
-  len(message.id) because this is always 2, instead, it's should be
96744b
-  checked against catalog.num_plurals (ticket #212).
96744b
96744b
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-5
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
96744b
96744b
* Sat Mar 28 2009 Robert Scheck <robert@fedoraproject.org> - 0.9.4-4
96744b
- Added missing requires to python-setuptools for pkg_resources
96744b
96744b
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-3
96744b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
96744b
96744b
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.4-2
96744b
- Rebuild for Python 2.6
96744b
96744b
* Mon Aug 25 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.4-1
96744b
- Update to 0.9.4
96744b
96744b
* Thu Jul 10 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.3-1
96744b
- Update to 0.9.3
96744b
96744b
* Sun Dec 16 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.1-1
96744b
- Update to 0.9.1
96744b
96744b
* Tue Aug 28 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9-2
96744b
- BR python-setuptools-devel
96744b
96744b
* Mon Aug 27 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9-1
96744b
- Update to 0.9
96744b
96744b
* Mon Jul  2 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8.1-1
96744b
- Update to 0.8.1
96744b
- Remove upstreamed patch.
96744b
96744b
* Fri Jun 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-3
96744b
- Replace patch with one that actually applies.
96744b
96744b
* Fri Jun 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-2
96744b
- Apply upstream patch to rename command line script to "pybabel" - BZ#246208
96744b
96744b
* Thu Jun 21 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-1
96744b
- First version for Fedora
96744b