0faff17
%global srcname Babel
0faff17
%global sum Library for internationalizing Python applications
d18f157
3b7d653
# On fedora 24 and beyond we want to use the python3 version by default
3b7d653
# (Only reason earlier versions aren't switched is that we didn't push it out
3b7d653
# before the release)
9a82ece
%if 0%{?fedora} >= 24
3b7d653
%global default_python 3
3b7d653
%else
3b7d653
%global default_python 2
3b7d653
%endif
3b7d653
d18f157
Name:           babel
6593458
Version:        2.3.4
6593458
Release:        1%{?dist}
d18f157
Summary:        Tools for internationalizing Python applications
d18f157
d18f157
License:        BSD
9385b4f
URL:            http://babel.pocoo.org/
0faff17
Source0:        https://pypi.python.org/packages/source/B/%{srcname}/%{srcname}-%{version}.tar.gz
1cb34c6
Patch0:         babel-remove-pytz-version.patch
d18f157
d18f157
BuildArch:      noarch
dd48c78
1cb34c6
BuildRequires:  python2-devel
0faff17
BuildRequires:  python2-setuptools
b6ee328
BuildRequires:  pytz
0faff17
BuildRequires:  python3-devel
0faff17
BuildRequires:  python3-setuptools
0faff17
BuildRequires:  python3-pytz
dd48c78
9385b4f
# build the documentation
9385b4f
BuildRequires:  make
9385b4f
9a82ece
%if %{default_python} >= 3
0faff17
BuildRequires:  python3-sphinx
3b7d653
Requires:       python3-babel
3b7d653
Requires:       python3-setuptools
3b7d653
%else
0faff17
BuildRequires:  python-sphinx
0faff17
Requires:       python2-babel
0faff17
Requires:       python2-setuptools
3b7d653
%endif
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
0faff17
%package -n python2-babel
0faff17
Summary:        %sum
d18f157
caf2b2c
Requires:       python-setuptools
caf2b2c
Requires:       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.
d18f157
dd48c78
%package -n python3-babel
0faff17
Summary:        %sum
dd48c78
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
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
f6c01ea
d18f157
%prep
0faff17
%autosetup -n %{srcname}-%{version}
dd48c78
d18f157
%build
0faff17
%py2_build
0faff17
%py3_build
d18f157
9f564fc
BUILDDIR="$PWD/built-docs"
9f564fc
rm -rf "$BUILDDIR"
9f564fc
pushd docs
9f564fc
make \
9f564fc
%if %{default_python} >= 3
9f564fc
    SPHINXBUILD=sphinx-build-3 \
9f564fc
%else
9f564fc
    SPHINXBUILD=sphinx-build \
9f564fc
%endif
9f564fc
    BUILDDIR="$BUILDDIR" \
9f564fc
    html
9f564fc
popd
9f564fc
rm -f "$BUILDDIR/html/.buildinfo"
9385b4f
d18f157
%install
9a82ece
%if %{default_python} >= 3
0faff17
%py2_install
0faff17
%py3_install
0faff17
%else
0faff17
%py3_install
0faff17
%py2_install
4a520bf
%endif
4a520bf
0faff17
%check
0faff17
%{__python2} setup.py test
0faff17
%{__python3} setup.py test
d18f157
d18f157
%files
3d0dad5
%doc CHANGES AUTHORS
3d0dad5
%license LICENSE
b056992
%{_bindir}/pybabel
d18f157
0faff17
%files -n python2-babel
0faff17
%{python2_sitelib}/Babel-%{version}-py*.egg-info
0faff17
%{python2_sitelib}/babel
dd48c78
dd48c78
%files -n python3-babel
b9048df
%{python3_sitelib}/Babel-%{version}-py*.egg-info
b9048df
%{python3_sitelib}/babel
d18f157
f6c01ea
%files doc
9f564fc
%doc built-docs/html/*
f6c01ea
d18f157
%changelog
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
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