893548
# Babel < 1.0 does NOT work with Python 3, even if 2to3 is used on the code
893548
%global with_python3 0
893548
893548
Name:           babel
893548
Version:        0.9.6
bc373c
Release:        8%{?dist}
893548
Summary:        Tools for internationalizing Python applications
893548
893548
Group:          Development/Languages
893548
License:        BSD
893548
URL:            http://babel.edgewall.org/
893548
Source0:        http://ftp.edgewall.com/pub/babel/Babel-%{version}.tar.gz
893548
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
893548
893548
BuildArch:      noarch
893548
893548
BuildRequires:  python-devel
893548
BuildRequires:  python-setuptools-devel
893548
BuildRequires:  pytz
893548
893548
Requires:       python-babel
893548
Requires:       python-setuptools
893548
893548
%if 0%{?with_python3}
893548
BuildRequires:  python3-devel
893548
BuildRequires:  python3-setuptools
893548
# needed for 2to3
893548
BuildRequires:  python-tools
893548
%endif
893548
893548
%description
893548
Babel is composed of two major parts:
893548
893548
* tools to build and work with gettext message catalogs
893548
893548
* a Python interface to the CLDR (Common Locale Data Repository),
893548
  providing access to various locale display names, localized number
893548
  and date formatting, etc.
893548
893548
%package -n python-babel
893548
Summary:        Library for internationalizing Python applications
893548
Group:          Development/Languages
893548
# previously Fedora shipped a broken subpackage python3-babel which is gone now
893548
# (until upstream releases a version with Python 3 support)
893548
Obsoletes:      python3-babel < 0.9.6-4
893548
893548
%description -n python-babel
893548
Babel is composed of two major parts:
893548
893548
* tools to build and work with gettext message catalogs
893548
893548
* a Python interface to the CLDR (Common Locale Data Repository),
893548
  providing access to various locale display names, localized number
893548
  and date formatting, etc.
893548
893548
%if 0%{?with_python3}
893548
%package -n python3-babel
893548
Summary:        Library for internationalizing Python applications
893548
Group:          Development/Languages
893548
893548
%description -n python3-babel
893548
Babel is composed of two major parts:
893548
893548
* tools to build and work with gettext message catalogs
893548
893548
* a Python interface to the CLDR (Common Locale Data Repository),
893548
  providing access to various locale display names, localized number
893548
  and date formatting, etc.
893548
%endif
893548
893548
%prep
893548
%setup0 -q -n Babel-%{version}
893548
chmod a-x babel/messages/frontend.py doc/logo.png doc/logo_small.png
893548
%{__sed} -i -e '/^#!/,1d' babel/messages/frontend.py
893548
893548
%if 0%{?with_python3}
893548
rm -rf %{py3dir}
893548
cp -r . %{py3dir}
893548
2to3 --write --nobackup %{py3dir}
893548
%endif
893548
893548
%build
893548
%{__python} setup.py build
893548
893548
%if 0%{?with_python3}
893548
pushd %{py3dir}
893548
%{__python3} setup.py build
893548
popd
893548
%endif
893548
893548
%install
893548
rm -rf %{buildroot}
893548
# install python3 build before python2 build so executables from the former
893548
# don't overwrite those from the latter
893548
%if 0%{?with_python3}
893548
pushd %{py3dir}
893548
%{__python3} setup.py install --skip-build --no-compile --root %{buildroot}
893548
popd
893548
%endif
893548
893548
%{__python} setup.py install --skip-build --no-compile --root %{buildroot}
893548
893548
%check
893548
%{__python} setup.py test
893548
893548
%if 0%{?with_python3}
893548
pushd %{py3dir}
893548
%{__python3} setup.py test
893548
popd
893548
%endif
893548
893548
%clean
893548
rm -rf %{buildroot}
893548
893548
%files
893548
%defattr(-,root,root,-)
893548
%doc ChangeLog COPYING README.txt doc/cmdline.txt
893548
%{_bindir}/pybabel
893548
893548
%files -n python-babel
893548
%defattr(-,root,root,-)
893548
%doc doc
893548
%{python_sitelib}/Babel-%{version}-py*.egg-info
893548
%{python_sitelib}/babel
893548
893548
%if 0%{?with_python3}
893548
%files -n python3-babel
893548
%defattr(-,root,root,-)
893548
%doc doc
893548
%{python3_sitelib}/Babel-%{version}-py*.egg-info
893548
%{python3_sitelib}/babel
893548
%endif
893548
893548
%changelog
bc373c
* Fri Dec 27 2013 Daniel Mach <dmach@redhat.com> - 0.9.6-8
bc373c
- Mass rebuild 2013-12-27
bc373c
893548
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-7
893548
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
893548
893548
* Thu Oct 18 2012 Nils Philippsen <nils@redhat.com> - 0.9.6-6
893548
- run tests in %%check
893548
- add pytz build requirement for tests
893548
893548
* Sat Aug 04 2012 David Malcolm <dmalcolm@redhat.com> - 0.9.6-5
893548
- rebuild for https://fedoraproject.org/wiki/Features/Python_3.3
893548
893548
* Wed Aug 01 2012 Felix Schwarz <felix.schwarz@oss.schwarz.eu> - 0.9.6-4
893548
- disable building of non-functional python3 subpackage (#761583)
893548
893548
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-3
893548
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
893548
893548
* Thu Jan 12 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.6-2
893548
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
893548
893548
* Tue Jun 07 2011 Nils Philippsen <nils@redhat.com> - 0.9.6-1
893548
- version 0.9.6:
893548
  * Backport r493-494: documentation typo fixes.
893548
  * Make the CLDR import script work with Python 2.7.
893548
  * Fix various typos.
893548
  * Fixed Python 2.3 compatibility (ticket #146, #233).
893548
  * Sort output of list-locales.
893548
  * Make the POT-Creation-Date of the catalog being updated equal to
893548
    POT-Creation-Date of the template used to update (ticket #148).
893548
  * Use a more explicit error message if no option or argument (command) is
893548
    passed to pybabel (ticket #81).
893548
  * Keep the PO-Revision-Date if it is not the default value (ticket #148).
893548
  * Make --no-wrap work by reworking --width's default and mimic xgettext's
893548
    behaviour of always wrapping comments (ticket #145).
893548
  * Fixed negative offset handling of Catalog._set_mime_headers (ticket #165).
893548
  * Add --project and --version options for commandline (ticket #173).
893548
  * Add a __ne__() method to the Local class.
893548
  * Explicitly sort instead of using sorted() and don't assume ordering
893548
    (Python 2.3 and Jython compatibility).
893548
  * Removed ValueError raising for string formatting message checkers if the
893548
    string does not contain any string formattings (ticket #150).
893548
  * Fix Serbian plural forms (ticket #213).
893548
  * Small speed improvement in format_date() (ticket #216).
893548
  * Fix number formatting for locales where CLDR specifies alt or draft
893548
    items (ticket #217)
893548
  * Fix bad check in format_time (ticket #257, reported with patch and tests by
893548
    jomae)
893548
  * Fix so frontend.CommandLineInterface.run does not accumulate logging
893548
    handlers (#227, reported with initial patch by dfraser)
893548
  * Fix exception if environment contains an invalid locale setting (#200)
893548
- install python2 rather than python3 executable (#710880)
893548
893548
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.5-4
893548
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
893548
893548
* Thu Aug 26 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.5-3
893548
- Add python3 subpackage
893548
893548
* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.9.5-2
893548
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
893548
893548
* Wed Apr  7 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.5-1
893548
- This release contains a small number of bugfixes over the 0.9.4
893548
- release.
893548
-
893548
- What's New:
893548
- -----------
893548
- * Fixed the case where messages containing square brackets would break
893548
-  with an unpack error
893548
- * Fuzzy matching regarding plurals should *NOT* be checked against
893548
-  len(message.id) because this is always 2, instead, it's should be
893548
-  checked against catalog.num_plurals (ticket #212).
893548
893548
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-5
893548
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
893548
893548
* Sat Mar 28 2009 Robert Scheck <robert@fedoraproject.org> - 0.9.4-4
893548
- Added missing requires to python-setuptools for pkg_resources
893548
893548
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-3
893548
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
893548
893548
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.4-2
893548
- Rebuild for Python 2.6
893548
893548
* Mon Aug 25 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.4-1
893548
- Update to 0.9.4
893548
893548
* Thu Jul 10 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.3-1
893548
- Update to 0.9.3
893548
893548
* Sun Dec 16 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.1-1
893548
- Update to 0.9.1
893548
893548
* Tue Aug 28 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9-2
893548
- BR python-setuptools-devel
893548
893548
* Mon Aug 27 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9-1
893548
- Update to 0.9
893548
893548
* Mon Jul  2 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8.1-1
893548
- Update to 0.8.1
893548
- Remove upstreamed patch.
893548
893548
* Fri Jun 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-3
893548
- Replace patch with one that actually applies.
893548
893548
* Fri Jun 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-2
893548
- Apply upstream patch to rename command line script to "pybabel" - BZ#246208
893548
893548
* Thu Jun 21 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-1
893548
- First version for Fedora
893548