lbalhar / rpms / babel

Forked from rpms/babel 4 years ago
Clone
597f5be
# Babel < 1.0 does NOT work with Python 3, even if 2to3 is used on the code
597f5be
%global with_python3 0
d18f157
d18f157
Name:           babel
ca3180c
Version:        0.9.6
f6c01ea
Release:        8%{?dist}
d18f157
Summary:        Tools for internationalizing Python applications
d18f157
d18f157
Group:          Development/Languages
d18f157
License:        BSD
d18f157
URL:            http://babel.edgewall.org/
7c2097d
Source0:        http://ftp.edgewall.com/pub/babel/Babel-%{version}.tar.gz
d18f157
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
d18f157
d18f157
BuildArch:      noarch
dd48c78
d18f157
BuildRequires:  python-devel
ff4fe44
BuildRequires:  python-setuptools-devel
b6ee328
BuildRequires:  pytz
dd48c78
d18f157
Requires:       python-babel
1a8a0b5
Requires:       python-setuptools
d18f157
dd48c78
%if 0%{?with_python3}
dd48c78
BuildRequires:  python3-devel
dd48c78
BuildRequires:  python3-setuptools
dd48c78
# needed for 2to3
dd48c78
BuildRequires:  python-tools
dd48c78
%endif
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
d18f157
%package -n python-babel
d18f157
Summary:        Library for internationalizing Python applications
d18f157
Group:          Development/Languages
597f5be
# previously Fedora shipped a broken subpackage python3-babel which is gone now
597f5be
# (until upstream releases a version with Python 3 support)
597f5be
Obsoletes:      python3-babel < 0.9.6-4
d18f157
d18f157
%description -n python-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
%if 0%{?with_python3}
dd48c78
%package -n python3-babel
dd48c78
Summary:        Library for internationalizing Python applications
dd48c78
Group:          Development/Languages
dd48c78
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
%endif
dd48c78
f6c01ea
%package doc
f6c01ea
Summary:        Documentation for Babel
f6c01ea
Group:          Development/Languages
f6c01ea
Provides:       python-babel-doc = %{version}-%{release}
f6c01ea
%if 0%{?with_python3}
f6c01ea
Provides:       python3-babel-doc = %{version}-%{release}
f6c01ea
%endif
f6c01ea
f6c01ea
%description doc
f6c01ea
Documentation for Babel
f6c01ea
d18f157
%prep
b056992
%setup0 -q -n Babel-%{version}
d18f157
chmod a-x babel/messages/frontend.py doc/logo.png doc/logo_small.png
d18f157
%{__sed} -i -e '/^#!/,1d' babel/messages/frontend.py
d18f157
dd48c78
%if 0%{?with_python3}
dd48c78
rm -rf %{py3dir}
dd48c78
cp -r . %{py3dir}
dd48c78
2to3 --write --nobackup %{py3dir}
dd48c78
%endif
dd48c78
d18f157
%build
d18f157
%{__python} setup.py build
d18f157
dd48c78
%if 0%{?with_python3}
dd48c78
pushd %{py3dir}
dd48c78
%{__python3} setup.py build
dd48c78
popd
dd48c78
%endif
dd48c78
d18f157
%install
d18f157
rm -rf %{buildroot}
6fe63e3
# install python3 build before python2 build so executables from the former
6fe63e3
# don't overwrite those from the latter
dd48c78
%if 0%{?with_python3}
dd48c78
pushd %{py3dir}
dd48c78
%{__python3} setup.py install --skip-build --no-compile --root %{buildroot}
dd48c78
popd
dd48c78
%endif
dd48c78
6fe63e3
%{__python} setup.py install --skip-build --no-compile --root %{buildroot}
6fe63e3
92f5fcd
%check
92f5fcd
%{__python} setup.py test
92f5fcd
92f5fcd
%if 0%{?with_python3}
92f5fcd
pushd %{py3dir}
92f5fcd
%{__python3} setup.py test
92f5fcd
popd
92f5fcd
%endif
92f5fcd
d18f157
%clean
d18f157
rm -rf %{buildroot}
d18f157
d18f157
%files
d18f157
%defattr(-,root,root,-)
b056992
%doc ChangeLog COPYING README.txt doc/cmdline.txt
b056992
%{_bindir}/pybabel
d18f157
d18f157
%files -n python-babel
d18f157
%defattr(-,root,root,-)
cac2dbe
%{python_sitelib}/Babel-%{version}-py*.egg-info
dd48c78
%{python_sitelib}/babel
dd48c78
dd48c78
%if 0%{?with_python3}
dd48c78
%files -n python3-babel
dd48c78
%defattr(-,root,root,-)
b9048df
%{python3_sitelib}/Babel-%{version}-py*.egg-info
b9048df
%{python3_sitelib}/babel
dd48c78
%endif
d18f157
f6c01ea
%files doc
f6c01ea
%doc doc/*
f6c01ea
d18f157
%changelog
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