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.7.0
Release:        1%{?dist}
Summary:        A library to parse and manage gettext catalogs

Group:          Development/Languages
License:        MIT
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildArch:      noarch
BuildRequires:  python-devel

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

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.

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

%{__python} build

%{__python} install -O1 --skip-build --root $RPM_BUILD_ROOT



* Fri Oct 28 2011 Ding-Yi Chen <> - 0.7.0-1
- Correct URLs
- Replace README with README.rst
- Update to 0.7.0:
  From Version 0.7.0 (2011/07/14)
      This version adds support for python 3 (thanks to Vinay Sajip).
      polib now supports out-of-the-box any version of python ranging 
      from 2.4 to latest 3.X version.
  From Version 0.6.4 (2011/07/13)
      * Better api, autodetected_encoding is no longer required to 
        explicitely set the encoding (fixes issue #23),
      * Fixed issue #24 Support indented PO files (thanks to 
        François Poirotte).
  From Version 0.6.3 (2011/02/19)
      * Fixed issue #19 (Disappearing newline characters due to 
        textwrap module),
      * ensure wrapping works as expected.
  From Version 0.6.2 (2011/02/09)
      * Backported textwrap.TextWrapper._wrap_chunks that has support
        for the drop_whitespace parameter added in Python 2.6 (Fixes 
        #18: broken compatibility with python 2.5, thanks @jezdez).
  From Version 0.6.1 (2011/02/09)
      * fixed regression that prevented POFile initialization from 
        data to work (issue #17).
  From Version 0.6.0 (2011/02/07)
      * polib is now fully documented,
      * switched from doctests to unit tests to keep the 
        file clean,
      * fixed issue #7 (wrapping issues, thanks @jezdez),
      * added a __eq__ method to _BaseFile (thanks @kost BebiX),
      * handle msgctxt correctly when compiling mo files,
      * compiled mo files are now exactly the same as those compiled
        by msgfmt without using hash tables.
  From Version 0.5.5 (2010/10/30)
      * Removed multiline handling code, it was a mess and was the
        source of potential bugs like issue #11,
      * Fixed typo in README and CHANGELOG, fixes issue #13.
  From Version 0.5.4 (2010/10/02)
     * fixed an issue with detect_encoding(), in some cases it could
       return an invalid charset.
  From Version 0.5.3 (2010/08/29)
     * correctly unescape lines containing both \\n and \n 
      (thanks to Martin Geisler),
     * fixed issue #6: __str__() methods are returning unicode instead
       of str,
     * fixed issue #8: POFile.merge error when an entry is obsolete in
       a .po, that this entry reappears in the .pot and that we merge 
       the two,
     * added support to instanciate POFile objects using data instead 
       of file path (thanks to Diego Búrigo Zacarão),
     * fixed issue #9: POFile.merge drop fuzzy attributes from 
       translations (thanks to Tim Gerundt),
     * fixed issue #10: Finding entries with the same msgid and 
       different context (msgctxt).
  From Version 0.5.2 (2010/06/09)
     * fixed issue #1: untranslated_entries() also show fuzzy message,
     * write back the fuzzy header if present in the pofile,
     * added support for previous msgctxt, previous msgid and previous
       msgid_plural comments (fixes issue #5),
     * better handling of lines wrapping.

* Tue Feb 08 2011 Fedora Release Engineering <> - 0.5.1-3
- Rebuilt for

* Thu Jul 22 2010 David Malcolm <> - 0.5.1-2
- Rebuilt for

* Mon Dec 14 2009 Diego Búrigo Zacarão <> - 0.5.1-1
- Updated to 0.5.1 release

* Wed Aug 19 2009 Diego Búrigo Zacarão <> - 0.4.2-1
- Updated to 0.4.2 release

* Sun Jul 26 2009 Fedora Release Engineering <> - 0.4.0-2.20080217svnr60
- Rebuilt for

* Wed Feb 18 2009 Ignacio Vazquez-Abrams <> 0.4.0-1.20080217svnr60
- Initial RPM release