Jeffrey C. Ollie d18f15
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
Jeffrey C. Ollie d18f15
Jeffrey C. Ollie d18f15
Name:           babel
Jeffrey C. Ollie d18f15
Version:        0.8
Jeffrey C. Ollie b05699
Release:        2%{?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 d18f15
Source0:        http://ftp.edgewall.com/pub/babel/Babel-%{version}.tar.bz2
Jeffrey C. Ollie b05699
# Upstream patch:
Jeffrey C. Ollie b05699
# http://babel.edgewall.org/changeset/192?format=diff&new=192
Jeffrey C. Ollie b05699
Patch0:         babel-0.8-pybabel.patch
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 d18f15
BuildRequires:  python-devel
Jeffrey C. Ollie d18f15
BuildRequires:  python-setuptools
Jeffrey C. Ollie d18f15
Requires:       python-babel
Jeffrey C. Ollie d18f15
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
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 d18f15
%prep
Jeffrey C. Ollie b05699
%setup0 -q -n Babel-%{version}
Jeffrey C. Ollie b05699
%path0 -p1
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 d18f15
%build
Jeffrey C. Ollie d18f15
%{__python} setup.py build
Jeffrey C. Ollie d18f15
Jeffrey C. Ollie d18f15
%install
Jeffrey C. Ollie d18f15
rm -rf %{buildroot}
Jeffrey C. Ollie d18f15
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
Jeffrey C. Ollie d18f15
 
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 d18f15
%{python_sitelib}/*
Jeffrey C. Ollie d18f15
Jeffrey C. Ollie d18f15
%changelog
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