Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

%define alphatag r60

Name:           python-polib
Version:        0.4.0
Release:        1%{?dist}.20080217svn%{alphatag}
Summary:        A library to parse and manage gettext catalogs

Group:          Development/Languages
License:        MIT
URL:            http://code.google.com/p/polib/
# svn export -r60 http://polib.googlecode.com/svn/trunk/ polib-0.4.0-r60
# tar zcf polib-0.4.0-r60.tar.gz polib-0.4.0-r60
Source0:        polib-%{version}-%{alphatag}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel

%description
polib allows you to manipulate, create, modify gettext files (pot, po and
mo files). You can load existing files, iterate through it's entries, add,
modify entries, comments or metadata, etc... or create new po files from
scratch.

polib provides a simple and pythonic API, exporting only three convenience
functions 'pofile', 'mofile' and 'detect_encoding', and the 4 core classes:
POFile, MOFile, POEntry and MOEntry for creating new files/entries.

%prep
%setup -q -n polib-%{version}-%{alphatag}

%build
%{__python} setup.py build

%install
rm -rf $RPM_BUILD_ROOT
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc CHANGELOG LICENSE README docs/
%{python_sitelib}/*

%changelog
* Wed Feb 18 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.4.0-1.20080217svnr60
- Initial RPM release