Jeffrey C. Ollie 5ecfcc
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Jeffrey C. Ollie 5ecfcc
Steve Traylen e1a8f5
%if 0%{?el5}
Felix Schwarz b56933
%global with_python26 0
Steve Traylen e1a8f5
%global py26dir %{_builddir}/python26-%{name}-%{version}-%{release}
Steve Traylen e1a8f5
%global __python26 /usr/bin/python2.6
Steve Traylen e1a8f5
%global python26_sitelib /usr/lib/python2.6/site-packages
Steve Traylen e1a8f5
# Disable byte compiling. Do ourselves later.
Steve Traylen e1a8f5
%global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') 
Steve Traylen e1a8f5
%endif
Steve Traylen e1a8f5
Steve Traylen e1a8f5
Steve Traylen e1a8f5
%if 0%{?with_python26}
Steve Traylen e1a8f5
BuildRequires:  python26-devel
Steve Traylen e1a8f5
BuildRequires:  python26-distribute
Steve Traylen e1a8f5
%endif
Steve Traylen e1a8f5
Steve Traylen e1a8f5
Jeffrey C. Ollie 5ecfcc
Name:           babel
Jeffrey C. Ollie d5f0ab
Version:        0.9.5
Felix Schwarz b56933
Release:        3%{?dist}
Jeffrey C. Ollie 5ecfcc
Summary:        Tools for internationalizing Python applications
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
Group:          Development/Languages
Jeffrey C. Ollie 5ecfcc
License:        BSD
Jeffrey C. Ollie 5ecfcc
URL:            http://babel.edgewall.org/
Jeffrey C. Ollie d5f0ab
Source0:        http://ftp.edgewall.com/pub/babel/Babel-%{version}.tar.gz
Jeffrey C. Ollie 5ecfcc
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
BuildArch:      noarch
Jeffrey C. Ollie 5ecfcc
BuildRequires:  python-devel
Steve Traylen e1a8f5
BuildRequires:  python-setuptools
Jeffrey C. Ollie 5ecfcc
Requires:       python-babel
Jeffrey C. Ollie d5f0ab
Requires:       python-setuptools
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
%description
Jeffrey C. Ollie 5ecfcc
Babel is composed of two major parts:
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
* tools to build and work with gettext message catalogs
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
* a Python interface to the CLDR (Common Locale Data Repository),
Jeffrey C. Ollie 5ecfcc
  providing access to various locale display names, localized number
Jeffrey C. Ollie 5ecfcc
  and date formatting, etc.
Jeffrey C. Ollie 5ecfcc
Steve Traylen e1a8f5
%if 0%{?with_python26}
Steve Traylen e1a8f5
%package -n python26-babel
Steve Traylen e1a8f5
Summary:        Library for internationalizing Python applications
Steve Traylen e1a8f5
Group:          Development/Languages
Steve Traylen e1a8f5
Requires:       python(abi) = 2.6
Steve Traylen e1a8f5
Steve Traylen e1a8f5
%description -n python26-babel
Steve Traylen e1a8f5
Babel is composed of two major parts:
Steve Traylen e1a8f5
Steve Traylen e1a8f5
* tools to build and work with gettext message catalogs
Steve Traylen e1a8f5
Steve Traylen e1a8f5
* a Python interface to the CLDR (Common Locale Data Repository),
Steve Traylen e1a8f5
  providing access to various locale display names, localized number
Steve Traylen e1a8f5
  and date formatting, etc.
Steve Traylen e1a8f5
%endif
Steve Traylen e1a8f5
Steve Traylen e1a8f5
Jeffrey C. Ollie 5ecfcc
%package -n python-babel
Jeffrey C. Ollie 5ecfcc
Summary:        Library for internationalizing Python applications
Jeffrey C. Ollie 5ecfcc
Group:          Development/Languages
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
%description -n python-babel
Jeffrey C. Ollie 5ecfcc
Babel is composed of two major parts:
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
* tools to build and work with gettext message catalogs
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
* a Python interface to the CLDR (Common Locale Data Repository),
Jeffrey C. Ollie 5ecfcc
  providing access to various locale display names, localized number
Jeffrey C. Ollie 5ecfcc
  and date formatting, etc.
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
%prep
Jeffrey C. Ollie 6800f3
%setup0 -q -n Babel-%{version}
Jeffrey C. Ollie 5ecfcc
chmod a-x babel/messages/frontend.py doc/logo.png doc/logo_small.png
Jeffrey C. Ollie 5ecfcc
%{__sed} -i -e '/^#!/,1d' babel/messages/frontend.py
Jeffrey C. Ollie 5ecfcc
Steve Traylen e1a8f5
%if 0%{?with_python26}
Steve Traylen e1a8f5
rm -rf %{py26dir}
Steve Traylen e1a8f5
mkdir -p %{py26dir}
Steve Traylen e1a8f5
cp -r . %{py26dir}
Steve Traylen e1a8f5
%endif
Steve Traylen e1a8f5
Steve Traylen e1a8f5
Steve Traylen e1a8f5
Jeffrey C. Ollie 5ecfcc
%build
Steve Traylen e1a8f5
%if 0%{?with_python26}
Steve Traylen e1a8f5
pushd %{py26dir}
Steve Traylen e1a8f5
%{__python26} setup.py build
Steve Traylen e1a8f5
popd
Steve Traylen e1a8f5
%endif
Steve Traylen e1a8f5
Jeffrey C. Ollie 5ecfcc
%{__python} setup.py build
Jeffrey C. Ollie 5ecfcc
Steve Traylen e1a8f5
Jeffrey C. Ollie 5ecfcc
%install
Jeffrey C. Ollie 5ecfcc
rm -rf %{buildroot}
Steve Traylen e1a8f5
%if 0%{?with_python26}
Steve Traylen e1a8f5
pushd %{py26dir}
Steve Traylen e1a8f5
%{__python26} setup.py install --skip-build --no-compile --root %{buildroot}
Steve Traylen e1a8f5
popd
Steve Traylen e1a8f5
# remove the 2.6 version of the command we just installed.
Steve Traylen e1a8f5
rm %{buildroot}%{_bindir}/pybabel
Steve Traylen e1a8f5
%endif
Steve Traylen e1a8f5
Jeffrey C. Ollie 5ecfcc
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
Jeffrey C. Ollie 5ecfcc
 
Steve Traylen e1a8f5
# Now do our own byte compiling.
Steve Traylen e1a8f5
%if 0%{?with_python26}
Steve Traylen e1a8f5
%{__python} -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", 10, "%{python_sitelib}", 1)' > /dev/null
Steve Traylen e1a8f5
%{__python} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT"'", 10, "%{python_sitelib}", 1)' > /dev/null
Steve Traylen e1a8f5
%{__python26} -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT%{python26_sitelib}"'", 10, "%{python26_sitelib}", 1)' > /dev/null
Steve Traylen e1a8f5
%{__python26} -O -c 'import compileall; compileall.compile_dir("'"$RPM_BUILD_ROOT%{python26_sitelib}"'", 10, "%{python26_sitelib}", 1)' > /dev/null
Steve Traylen e1a8f5
%endif
Steve Traylen e1a8f5
Steve Traylen e1a8f5
Jeffrey C. Ollie 5ecfcc
%clean
Jeffrey C. Ollie 5ecfcc
rm -rf %{buildroot}
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
%files
Jeffrey C. Ollie 5ecfcc
%defattr(-,root,root,-)
Jeffrey C. Ollie 6800f3
%doc ChangeLog COPYING README.txt doc/cmdline.txt
Jeffrey C. Ollie 6800f3
%{_bindir}/pybabel
Jeffrey C. Ollie 5ecfcc
Jeffrey C. Ollie 5ecfcc
%files -n python-babel
Jeffrey C. Ollie 5ecfcc
%defattr(-,root,root,-)
Jeffrey C. Ollie 5ecfcc
%doc doc
Jeffrey C. Ollie 5ecfcc
%{python_sitelib}/*
Jeffrey C. Ollie 5ecfcc
Steve Traylen e1a8f5
%if 0%{?with_python26}
Steve Traylen e1a8f5
%files -n python26-babel
Steve Traylen e1a8f5
%defattr(-,root,root,-)
Steve Traylen e1a8f5
%doc doc
Steve Traylen e1a8f5
%{python26_sitelib}/Babel-%{version}-py*.egg-info
Steve Traylen e1a8f5
%{python26_sitelib}/babel
Steve Traylen e1a8f5
%endif
Steve Traylen e1a8f5
Jeffrey C. Ollie 5ecfcc
%changelog
Felix Schwarz b56933
* Sat Jan 24 2015 Felix Schwarz <fschwarz@fedoraproject.org> - 0.9.5-3
Felix Schwarz b56933
- disable python26 subpackage as python26 will be removed for EPEL 5
Felix Schwarz b56933
Steve Traylen e1a8f5
* Sun Dec 12 2010 Steve Traylen <steve.traylen@cern.ch> - 0.9.5-2
Steve Traylen e1a8f5
- Add python26 subpackage
Steve Traylen e1a8f5
Jeffrey C. Ollie d5f0ab
* Wed Apr  7 2010 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.5-1
Jeffrey C. Ollie d5f0ab
- This release contains a small number of bugfixes over the 0.9.4
Jeffrey C. Ollie d5f0ab
- release.
Jeffrey C. Ollie d5f0ab
- 
Jeffrey C. Ollie d5f0ab
- What's New:
Jeffrey C. Ollie d5f0ab
- -----------
Jeffrey C. Ollie d5f0ab
- * Fixed the case where messages containing square brackets would break
Jeffrey C. Ollie d5f0ab
-  with an unpack error
Jeffrey C. Ollie d5f0ab
- * Fuzzy matching regarding plurals should *NOT* be checked against
Jeffrey C. Ollie d5f0ab
-  len(message.id) because this is always 2, instead, it's should be
Jeffrey C. Ollie d5f0ab
-  checked against catalog.num_plurals (ticket #212).
Jeffrey C. Ollie d5f0ab
Jeffrey C. Ollie d5f0ab
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-5
Jeffrey C. Ollie d5f0ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
Jeffrey C. Ollie d5f0ab
Jeffrey C. Ollie d5f0ab
* Sat Mar 28 2009 Robert Scheck <robert@fedoraproject.org> - 0.9.4-4
Jeffrey C. Ollie d5f0ab
- Added missing requires to python-setuptools for pkg_resources
Jeffrey C. Ollie d5f0ab
Jeffrey C. Ollie d5f0ab
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.9.4-3
Jeffrey C. Ollie d5f0ab
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
Jeffrey C. Ollie d5f0ab
Jeffrey C. Ollie d5f0ab
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 0.9.4-2
Jeffrey C. Ollie d5f0ab
- Rebuild for Python 2.6
Jeffrey C. Ollie d5f0ab
Jeffrey C. Ollie cf9a7d
* Mon Aug 25 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.4-1
Jeffrey C. Ollie cf9a7d
- Update to 0.9.4
Jeffrey C. Ollie cf9a7d
Jeffrey C. Ollie cf9a7d
* Thu Jul 10 2008 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.3-1
Jeffrey C. Ollie cf9a7d
- Update to 0.9.3
Jeffrey C. Ollie cf9a7d
Jeffrey C. Ollie 77d8b9
* Sun Dec 16 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9.1-1
Jeffrey C. Ollie 77d8b9
- Update to 0.9.1
Jeffrey C. Ollie 77d8b9
Jeffrey C. Ollie 77d8b9
* Tue Aug 28 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9-2
Jeffrey C. Ollie 77d8b9
- BR python-setuptools-devel
Jeffrey C. Ollie 77d8b9
Jeffrey C. Ollie 77d8b9
* Mon Aug 27 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.9-1
Jeffrey C. Ollie 77d8b9
- Update to 0.9
Jeffrey C. Ollie 77d8b9
Jeffrey C. Ollie 6ff085
* Mon Jul  2 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8.1-1
Jeffrey C. Ollie 6ff085
- Update to 0.8.1
Jeffrey C. Ollie 6ff085
- Remove upstreamed patch.
Jeffrey C. Ollie 6ff085
Jeffrey C. Ollie 6800f3
* Fri Jun 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-3
Jeffrey C. Ollie 6800f3
- Replace patch with one that actually applies.
Jeffrey C. Ollie 6800f3
Jeffrey C. Ollie 6800f3
* Fri Jun 29 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-2
Jeffrey C. Ollie 6800f3
- Apply upstream patch to rename command line script to "pybabel" - BZ#246208
Jeffrey C. Ollie 6800f3
Jeffrey C. Ollie 5ecfcc
* Thu Jun 21 2007 Jeffrey C. Ollie <jeff@ocjtech.us> - 0.8-1
Jeffrey C. Ollie 5ecfcc
- First version for Fedora
Jeffrey C. Ollie 5ecfcc