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