lbalhar / rpms / babel

Forked from rpms/babel 4 years ago
Clone
0faff17
%global srcname Babel
0faff17
%global sum Library for internationalizing Python applications
d18f157
552d7bd
# There is some bootstrapping involved when upgrading Python 3
552d7bd
# First of all we need babel (this package) to use sphinx
552d7bd
# And pytest is at this point not yet ready
2b02936
%bcond_with bootstrap
552d7bd
1a7f9b3
# Build without Python 2 support from F33 on.
1a7f9b3
%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 33 || 0%{?rhel} >= 9
23d90ba
%bcond_with python2
23d90ba
%else
23d90ba
%bcond_without python2
1e4b31e
# We ship python2-pytest only up to F31.
1e4b31e
%if !0%{?fedora}%{?rhel} || 0%{?fedora} >= 32 || 0%{?rhel} >= 9
1e4b31e
%bcond_with python2_pytest
1e4b31e
%else
1e4b31e
%bcond_without python2_pytest
1e4b31e
%endif
23d90ba
%endif
d069919
1e4b31e
d18f157
Name:           babel
901ddaa
Version:        2.7.0
1a7f9b3
Release:        7%{?dist}
d18f157
Summary:        Tools for internationalizing Python applications
d18f157
d18f157
License:        BSD
9385b4f
URL:            http://babel.pocoo.org/
e7177a8
Source0:        https://files.pythonhosted.org/packages/source/B/%{srcname}/%{srcname}-%{version}.tar.gz
d18f157
d18f157
BuildArch:      noarch
dd48c78
23d90ba
%if %{with python2}
1cb34c6
BuildRequires:  python2-devel
0faff17
BuildRequires:  python2-setuptools
1e4b31e
%if %{with python2_pytest}
32cf2bb
BuildRequires:  python2-pytz
32cf2bb
BuildRequires:  python2-pytest
660f8ad
BuildRequires:  python2-freezegun
d069919
%endif
28d477e
%endif
0faff17
BuildRequires:  python3-devel
0faff17
BuildRequires:  python3-setuptools
2b02936
%if !%{with bootstrap}
0faff17
BuildRequires:  python3-pytz
32cf2bb
BuildRequires:  python3-pytest
660f8ad
BuildRequires:  python3-freezegun
552d7bd
%endif
dd48c78
9385b4f
# build the documentation
9385b4f
BuildRequires:  make
9385b4f
2b02936
%if !%{with bootstrap}
0faff17
BuildRequires:  python3-sphinx
552d7bd
%endif
3b7d653
Requires:       python3-babel
3b7d653
Requires:       python3-setuptools
d18f157
dd48c78
d18f157
%description
d18f157
Babel is composed of two major parts:
d18f157
d18f157
* tools to build and work with gettext message catalogs
d18f157
d18f157
* a Python interface to the CLDR (Common Locale Data Repository),
d18f157
  providing access to various locale display names, localized number
d18f157
  and date formatting, etc.
d18f157
d069919
23d90ba
%if %{with python2}
0faff17
%package -n python2-babel
0faff17
Summary:        %sum
d18f157
6a78682
Requires:       python2-setuptools
41c99f7
Requires:       python2-pytz
caf2b2c
3bdaf41
%{?python_provide:%python_provide python2-babel}
0faff17
0faff17
%description -n python2-babel
d18f157
Babel is composed of two major parts:
d18f157
d18f157
* tools to build and work with gettext message catalogs
d18f157
d18f157
* a Python interface to the CLDR (Common Locale Data Repository),
d18f157
  providing access to various locale display names, localized number
d18f157
  and date formatting, etc.
d069919
%endif
d069919
d18f157
dd48c78
%package -n python3-babel
0faff17
Summary:        %sum
dd48c78
23d90ba
%if %{without python2}
23d90ba
Obsoletes:      python2-babel < 2.7.0-6%{?dist}
23d90ba
%endif
23d90ba
1730ff9
Requires:       python3-setuptools
1730ff9
Requires:       python3-pytz
1730ff9
3bdaf41
%{?python_provide:%python_provide python3-babel}
0faff17
dd48c78
%description -n python3-babel
dd48c78
Babel is composed of two major parts:
dd48c78
dd48c78
* tools to build and work with gettext message catalogs
dd48c78
dd48c78
* a Python interface to the CLDR (Common Locale Data Repository),
dd48c78
  providing access to various locale display names, localized number
dd48c78
  and date formatting, etc.
dd48c78
2b02936
%if !%{with bootstrap}
f6c01ea
%package doc
f6c01ea
Summary:        Documentation for Babel
f6c01ea
Provides:       python-babel-doc = %{version}-%{release}
0faff17
Provides:       python2-babel-doc = %{version}-%{release}
f6c01ea
Provides:       python3-babel-doc = %{version}-%{release}
f6c01ea
f6c01ea
%description doc
f6c01ea
Documentation for Babel
de07ff7
%endif
f6c01ea
d18f157
%prep
0faff17
%autosetup -n %{srcname}-%{version}
dd48c78
d18f157
%build
23d90ba
%if %{with python2}
0faff17
%py2_build
d069919
%endif
0faff17
%py3_build
d18f157
9f564fc
BUILDDIR="$PWD/built-docs"
9f564fc
rm -rf "$BUILDDIR"
de07ff7
2b02936
%if !%{with bootstrap}
9f564fc
pushd docs
9f564fc
make \
9f564fc
    SPHINXBUILD=sphinx-build-3 \
9f564fc
    BUILDDIR="$BUILDDIR" \
9f564fc
    html
9f564fc
popd
9f564fc
rm -f "$BUILDDIR/html/.buildinfo"
de07ff7
%endif
9385b4f
d18f157
%install
23d90ba
%if %{with python2}
0faff17
%py2_install
d069919
%endif
0faff17
%py3_install
4a520bf
0faff17
%check
9e48b96
export TZ=America/New_York
1e4b31e
%if %{with python2} && %{with python2_pytest}
e43430b
%{__python2} -m pytest
d069919
%endif
2b02936
%if !%{with bootstrap}
e43430b
%{__python3} -m pytest
552d7bd
%endif
d18f157
d18f157
%files
3d0dad5
%doc CHANGES AUTHORS
3d0dad5
%license LICENSE
b056992
%{_bindir}/pybabel
d18f157
23d90ba
%if %{with python2}
0faff17
%files -n python2-babel
0faff17
%{python2_sitelib}/Babel-%{version}-py*.egg-info
0faff17
%{python2_sitelib}/babel
d069919
%endif
dd48c78
dd48c78
%files -n python3-babel
b9048df
%{python3_sitelib}/Babel-%{version}-py*.egg-info
b9048df
%{python3_sitelib}/babel
d18f157
2b02936
%if !%{with bootstrap}
f6c01ea
%files doc
9f564fc
%doc built-docs/html/*
de07ff7
%endif
f6c01ea
d18f157
%changelog
1a7f9b3
* Thu Oct 31 2019 Nils Philippsen <nils@tiptoe.de> - 2.7.0-7
1a7f9b3
- drop python2-babel only from F33 on as it is needed for trac (for the time
1a7f9b3
  being, #1737930)
1a7f9b3
23d90ba
* Thu Oct 31 2019 Nils Philippsen <nils@tiptoe.de> - 2.7.0-6
23d90ba
- drop python2-babel from F32 on
23d90ba
28d477e
* Fri Sep 13 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-5
28d477e
- Reduce Python 2 build dependencies on Fedora 32
28d477e
acd8064
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-4
acd8064
- Rebuilt for Python 3.8
acd8064
53ba55b
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 2.7.0-3
53ba55b
- Bootstrap for Python 3.8
9b56e7d
5bed3a6
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0-2
5bed3a6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
5bed3a6
901ddaa
* Mon May 27 2019 Felix Schwarz <fschwarz@fedoraproject.org> - 2.7.0-1
901ddaa
- update to upstream version 2.7.0
901ddaa
3be97e1
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-6
3be97e1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
3be97e1
ec12711
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.6.0-5
ec12711
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
ec12711
d67f713
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-4
d67f713
- Rebuilt for Python 3.7
d67f713
d017262
* Mon Jul 02 2018 Miro Hrončok <mhroncok@redhat.com> - 2.6.0-3
d017262
- Rebuilt for Python 3.7
d017262
d069919
* Fri Jun 29 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 2.6.0-2
d069919
- add setting to build without Python 2 support
d069919
40a5e58
* Fri Jun 29 2018 Felix Schwarz <fschwarz@fedoraproject.org> - 2.6.0-1
40a5e58
- update to upstream version 2.6.0
40a5e58
e43430b
* Mon Jun 18 2018 Tomas Orsava <torsava@redhat.com> - 2.5.1-5
e43430b
- Run tests in pytest (as declared in BuildRequires)
e43430b
ceb0099
* Sat Jun 16 2018 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-4
ceb0099
- Rebuilt for Python 3.7
ceb0099
4590e2f
* Thu Jun 14 2018 Miro Hrončok <mhroncok@redhat.com> - 2.5.1-3
4590e2f
- Bootstrap for Python 3.7
4590e2f
d23fd5b
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.5.1-2
d23fd5b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
d23fd5b
660f8ad
* Fri Dec 15 2017 Felix Schwarz <fschwarz@fedoraproject.org> - 2.5.1-1
660f8ad
- update to upstream version 2.5.1
660f8ad
6a78682
* Fri Dec 15 2017 Iryna Shcherbina <ishcherb@redhat.com> - 2.3.4-7
6a78682
- Update Python 2 dependency declarations to new packaging standards
6a78682
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
6a78682
3e59c7d
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-6
3e59c7d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
3e59c7d
be4f14e
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-5
be4f14e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
be4f14e
ebd70c2
* Tue Dec 13 2016 Miro Hrončok <mhroncok@redhat.com> - 2.3.4-4
ebd70c2
- Finish bootstrapping for Python 3.6
ebd70c2
552d7bd
* Tue Dec 13 2016 Miro Hrončok <mhroncok@redhat.com> - 2.3.4-3
552d7bd
- Rebuild for Python 3.6
552d7bd
- Add "bootstrap" conditions
552d7bd
b234f59
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.3.4-2
b234f59
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
b234f59
e7177a8
* Tue May 31 2016 Nils Philippsen <nils@redhat.com>
e7177a8
- fix source URL
e7177a8
6593458
* Mon Apr 25 2016 Nils Philippsen <nils@redhat.com> - 2.3.4-1
6593458
- version 2.3.4
9a82ece
- always build Python3 subpackages
1b8102e
- remove obsolete packaging constructs
0faff17
- update to current Python packaging guidelines
9f564fc
- build docs non-destructively
3d0dad5
- tag license file as %%license
3bdaf41
- use %%python_provide macro only if present
e75ba03
- update remove-pytz-version patch
32cf2bb
- fix build dependencies
9e48b96
- set TZ in %%check
6593458
7ca753d
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.3-12
7ca753d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
7ca753d
8bccf8c
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-11
8bccf8c
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
8bccf8c
3b7d653
* Fri Nov  6 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-10
3b7d653
- Also make sure that the babel package that has pybabel depends on the correct
3b7d653
  packages (python2 packages on F23 or less and python3 packages on F24 and
3b7d653
  greater.)
3b7d653
4a520bf
* Wed Nov  4 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-9
4a520bf
- Install the python3 version of pybabel on Fedora 24+ to match with Fedora's
4a520bf
  default python version
4a520bf
b562985
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-8
b562985
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
b562985
1cb34c6
* Wed Dec 17 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-7
1cb34c6
- Remove pytz version requirement in egginfo as it confuses newer setuptools
1cb34c6
5156204
* Mon Jun 30 2014 Toshio Kuratomi <toshio@fedoraproject.org> - 1.3-6
1cb34c6
- Change python-setuptools-devel BR into python-setuptools
5156204
aca4cad
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3-5
aca4cad
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
aca4cad
633f111
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 1.3-4
633f111
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
633f111
caf2b2c
* Wed Apr 02 2014 Nils Philippsen <nils@redhat.com> - 1.3-3
caf2b2c
- fix dependencies (#1083470)
caf2b2c
1730ff9
* Sun Oct 06 2013 Felix Schwarz <fschwarz@fedoraproject.org> - 1.3-2
1730ff9
- enable python3 subpackage
1730ff9
9385b4f
* Wed Oct 02 2013 Felix Schwarz <fschwarz@fedoraproject.org> - 1.3-1
9385b4f
- update to Babel 1.3
9385b4f
- disabled %%check as it tries to download the CLDR
9385b4f
c2a47e7
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-9
c2a47e7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
c2a47e7
f6c01ea
* Wed Jun 26 2013 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.6-8
f6c01ea
- split documentation off to a separate subpackage
f6c01ea
2868883
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-7
2868883
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2868883
92f5fcd
* Thu Oct 18 2012 Nils Philippsen <nils@redhat.com> - 0.9.6-6
92f5fcd
- run tests in %%check
b6ee328
- add pytz build requirement for tests
92f5fcd
13a752d
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.9.6-5
13a752d
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
13a752d
597f5be
* Wed Aug 01 2012 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 0.9.6-4
597f5be
- disable building of non-functional python3 subpackage (#761583)
597f5be
634fdac
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-3
634fdac
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
634fdac
d97e82b
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
d97e82b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
d97e82b
ca3180c
* Tue Jun 07 2011 Nils Philippsen <nils@redhat.com> - 0.9.6-1
ca3180c
- version 0.9.6:
ca3180c
  * Backport r493-494: documentation typo fixes.
ca3180c
  * Make the CLDR import script work with Python 2.7.
ca3180c
  * Fix various typos.
ca3180c
  * Fixed Python 2.3 compatibility (ticket #146, #233).
ca3180c
  * Sort output of list-locales.
ca3180c
  * Make the POT-Creation-Date of the catalog being updated equal to
ca3180c
    POT-Creation-Date of the template used to update (ticket #148).
ca3180c
  * Use a more explicit error message if no option or argument (command) is
ca3180c
    passed to pybabel (ticket #81).
ca3180c
  * Keep the PO-Revision-Date if it is not the default value (ticket #148).
ca3180c
  * Make --no-wrap work by reworking --width's default and mimic xgettext's
ca3180c
    behaviour of always wrapping comments (ticket #145).
ca3180c
  * Fixed negative offset handling of Catalog._set_mime_headers (ticket #165).
ca3180c
  * Add --project and --version options for commandline (ticket #173).
ca3180c
  * Add a __ne__() method to the Local class.
ca3180c
  * Explicitly sort instead of using sorted() and don't assume ordering
ca3180c
    (Python 2.3 and Jython compatibility).
ca3180c
  * Removed ValueError raising for string formatting message checkers if the
ca3180c
    string does not contain any string formattings (ticket #150).
ca3180c
  * Fix Serbian plural forms (ticket #213).
ca3180c
  * Small speed improvement in format_date() (ticket #216).
ca3180c
  * Fix number formatting for locales where CLDR specifies alt or draft
ca3180c
    items (ticket #217)
ca3180c
  * Fix bad check in format_time (ticket #257, reported with patch and tests by
ca3180c
    jomae)
ca3180c
  * Fix so frontend.CommandLineInterface.run does not accumulate logging
ca3180c
    handlers (#227, reported with initial patch by dfraser)
ca3180c
  * Fix exception if environment contains an invalid locale setting (#200)
6fe63e3
- install python2 rather than python3 executable (#710880)
ca3180c
caa52e5
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-4
caa52e5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
caa52e5
dd48c78
* Thu Aug 26 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.5-3
dd48c78
- Add python3 subpackage
dd48c78
b0112af
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.5-2
b0112af
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
b0112af
7c2097d
* Wed Apr  7 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.5-1
7c2097d
- This release contains a small number of bugfixes over the 0.9.4
7c2097d
- release.
ca3180c
-
7c2097d
- What's New:
7c2097d
- -----------
7c2097d
- * Fixed the case where messages containing square brackets would break
7c2097d
-  with an unpack error
7c2097d
- * Fuzzy matching regarding plurals should *NOT* be checked against
7c2097d
-  len(message.id) because this is always 2, instead, it's should be
7c2097d
-  checked against catalog.num_plurals (ticket #212).
7c2097d
84bb10c
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-5
84bb10c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
84bb10c
1a8a0b5
* Sat Mar 28 2009 Robert Scheck <robert@fedoraproject.org> - 0.9.4-4
1a8a0b5
- Added missing requires to python-setuptools for pkg_resources
1a8a0b5
dcc56b9
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-3
dcc56b9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
dcc56b9
736d132
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.4-2
736d132
- Rebuild for Python 2.6
736d132
fa564c8
* Mon Aug 25 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.4-1
fa564c8
- Update to 0.9.4
fa564c8
57b188b
* Thu Jul 10 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.3-1
57b188b
- Update to 0.9.3
57b188b
b885ece
* Sun Dec 16 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.1-1
b885ece
- Update to 0.9.1
b885ece
ff4fe44
* Tue Aug 28 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9-2
ff4fe44
- BR python-setuptools-devel
ff4fe44
c019721
* Mon Aug 27 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9-1
c019721
- Update to 0.9
c019721
c6b05b1
* Mon Jul  2 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8.1-1
c6b05b1
- Update to 0.8.1
c6b05b1
- Remove upstreamed patch.
c6b05b1
70ba4d7
* Fri Jun 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-3
70ba4d7
- Replace patch with one that actually applies.
70ba4d7
b056992
* Fri Jun 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-2
b056992
- Apply upstream patch to rename command line script to "pybabel" - BZ#246208
b056992
d18f157
* Thu Jun 21 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-1
d18f157
- First version for Fedora
d18f157