279453f
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
279453f
86090d0
#%define alphatag r60
279453f
279453f
Name:           python-polib
561737c
Version:        0.7.0
2af1362
Release:        2%{?dist}
279453f
Summary:        A library to parse and manage gettext catalogs
279453f
279453f
Group:          Development/Languages
279453f
License:        MIT
561737c
URL:            http://bitbucket.org/izi/polib/
561737c
Source0:        http://bitbucket.org/izi/polib/downloads/polib-%{version}.tar.gz
279453f
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2af1362
Patch0:         polib-%{version}_dbafdc621bf4.patch
279453f
279453f
BuildArch:      noarch
279453f
BuildRequires:  python-devel
279453f
279453f
%description
279453f
polib allows you to manipulate, create, modify gettext files (pot, po and
279453f
mo files). You can load existing files, iterate through it's entries, add,
279453f
modify entries, comments or metadata, etc... or create new po files from
279453f
scratch.
279453f
279453f
polib provides a simple and pythonic API, exporting only three convenience
279453f
functions 'pofile', 'mofile' and 'detect_encoding', and the 4 core classes:
279453f
POFile, MOFile, POEntry and MOEntry for creating new files/entries.
279453f
279453f
%prep
86090d0
%setup -q -n polib-%{version}
2af1362
%patch0 -p1 -b .%{version}_dbafdc621bf4
279453f
279453f
%build
279453f
%{__python} setup.py build
279453f
279453f
%install
279453f
rm -rf $RPM_BUILD_ROOT
279453f
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
279453f
279453f
%clean
279453f
rm -rf $RPM_BUILD_ROOT
279453f
279453f
%files
279453f
%defattr(-,root,root,-)
561737c
%doc LICENSE README.rst
279453f
%{python_sitelib}/*
279453f
279453f
%changelog
2af1362
* Tue Nov 01 2011 Ding-Yi Chen <dchen@redhat.com> - 0.7.0-2
2af1362
- Update to upstream commit dbafdc621bf4, which include following:
2af1362
  * Add check for unescaped quotes at the beginning of the string + unit tests
2af1362
  * Fixed issue #27 (polib didn't check unescaped double quote) + better error handling
2af1362
  * Fixed typos in previous commit
2af1362
  * Fixed issue #26 IOError when parsing empty comments (thanks Türker Sezer)
2af1362
  * Do not hardcode polib version in doc conf
2af1362
561737c
* Fri Oct 28 2011 Ding-Yi Chen <dchen@redhat.com> - 0.7.0-1
561737c
- Correct URLs
561737c
- Replace README with README.rst
561737c
- Update to 0.7.0:
561737c
  From Version 0.7.0 (2011/07/14)
561737c
      This version adds support for python 3 (thanks to Vinay Sajip).
561737c
      polib now supports out-of-the-box any version of python ranging 
561737c
      from 2.4 to latest 3.X version.
561737c
  From Version 0.6.4 (2011/07/13)
561737c
      * Better api, autodetected_encoding is no longer required to 
561737c
        explicitely set the encoding (fixes issue #23),
561737c
      * Fixed issue #24 Support indented PO files (thanks to 
561737c
        François Poirotte).
561737c
  From Version 0.6.3 (2011/02/19)
561737c
      * Fixed issue #19 (Disappearing newline characters due to 
561737c
        textwrap module),
561737c
      * ensure wrapping works as expected.
561737c
  From Version 0.6.2 (2011/02/09)
561737c
      * Backported textwrap.TextWrapper._wrap_chunks that has support
561737c
        for the drop_whitespace parameter added in Python 2.6 (Fixes 
561737c
        #18: broken compatibility with python 2.5, thanks @jezdez).
561737c
  From Version 0.6.1 (2011/02/09)
561737c
      * fixed regression that prevented POFile initialization from 
561737c
        data to work (issue #17).
561737c
  From Version 0.6.0 (2011/02/07)
561737c
      * polib is now fully documented,
561737c
      * switched from doctests to unit tests to keep the polib.py 
561737c
        file clean,
561737c
      * fixed issue #7 (wrapping issues, thanks @jezdez),
561737c
      * added a __eq__ method to _BaseFile (thanks @kost BebiX),
561737c
      * handle msgctxt correctly when compiling mo files,
561737c
      * compiled mo files are now exactly the same as those compiled
561737c
        by msgfmt without using hash tables.
561737c
  From Version 0.5.5 (2010/10/30)
561737c
      * Removed multiline handling code, it was a mess and was the
561737c
        source of potential bugs like issue #11,
561737c
      * Fixed typo in README and CHANGELOG, fixes issue #13.
561737c
  From Version 0.5.4 (2010/10/02)
561737c
     * fixed an issue with detect_encoding(), in some cases it could
561737c
       return an invalid charset.
561737c
  From Version 0.5.3 (2010/08/29)
561737c
     * correctly unescape lines containing both \\n and \n 
561737c
      (thanks to Martin Geisler),
561737c
     * fixed issue #6: __str__() methods are returning unicode instead
561737c
       of str,
561737c
     * fixed issue #8: POFile.merge error when an entry is obsolete in
561737c
       a .po, that this entry reappears in the .pot and that we merge 
561737c
       the two,
561737c
     * added support to instanciate POFile objects using data instead 
561737c
       of file path (thanks to Diego Búrigo Zacarão),
561737c
     * fixed issue #9: POFile.merge drop fuzzy attributes from 
561737c
       translations (thanks to Tim Gerundt),
561737c
     * fixed issue #10: Finding entries with the same msgid and 
561737c
       different context (msgctxt).
561737c
  From Version 0.5.2 (2010/06/09)
561737c
     * fixed issue #1: untranslated_entries() also show fuzzy message,
561737c
     * write back the fuzzy header if present in the pofile,
561737c
     * added support for previous msgctxt, previous msgid and previous
561737c
       msgid_plural comments (fixes issue #5),
561737c
     * better handling of lines wrapping.
561737c
11a6350
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5.1-3
11a6350
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
11a6350
cebb55c
* Thu Jul 22 2010 David Malcolm <dmalcolm@redhat.com> - 0.5.1-2
cebb55c
- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild
cebb55c
143f524
* Mon Dec 14 2009 Diego Búrigo Zacarão <diegobz@gmail.com> - 0.5.1-1
143f524
- Updated to 0.5.1 release
143f524
86090d0
* Wed Aug 19 2009 Diego Búrigo Zacarão <diegobz@gmail.com> - 0.4.2-1
86090d0
- Updated to 0.4.2 release
86090d0
496560e
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.0-2.20080217svnr60
496560e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
496560e
279453f
* Wed Feb 18 2009 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> 0.4.0-1.20080217svnr60
279453f
- Initial RPM release
279453f