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