3 %bcond_without tests # do not perform "make test"
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
9 %define pypi_name polib
10 Summary: A library to parse and manage gettext catalogs
11 Name: python-%{pypi_name}
15 Source0: http://bitbucket.org/izi/polib/get/%{version}.tar.gz
16 # Source0-md5: 270110a7010425738e9a08832c5cba4f
17 Group: Libraries/Python
18 URL: http://bitbucket.org/izi/polib/
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.714
22 BuildRequires: python-modules
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules
27 BuildRequires: python3-setuptools
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 polib allows you to manipulate, create, modify gettext files (pot, po
34 and mo files). You can load existing files, iterate through it's
35 entries, add, modify entries, comments or metadata, etc... or create
36 new po files from scratch.
38 polib provides a simple and pythonic API, exporting only three
39 convenience functions 'pofile', 'mofile' and 'detect_encoding', and
40 the 4 core classes: POFile, MOFile, POEntry and MOEntry for creating
43 %package -n python3-%{pypi_name}
44 Summary: A library to parse and manage gettext catalogs
45 Group: Libraries/Python
47 %description -n python3-%{pypi_name}
48 polib allows you to manipulate, create, modify gettext files (pot, po
49 and mo files). You can load existing files, iterate through it's
50 entries, add, modify entries, comments or metadata, etc... or create
51 new po files from scratch.
53 polib provides a simple and pythonic API, exporting only three
54 convenience functions 'pofile', 'mofile' and 'detect_encoding', and
55 the 4 core classes: POFile, MOFile, POEntry and MOEntry for creating
60 mv izi-polib-d75ce6dbbc2a/* .
64 %py_build %{?with_tests:test}
68 %py3_build %{?with_tests:test}
72 rm -rf $RPM_BUILD_ROOT
83 rm -rf $RPM_BUILD_ROOT
87 %defattr(644,root,root,755)
88 %doc README.rst LICENSE
89 %{py_sitescriptdir}/%{module}.py[co]
90 %{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
94 %files -n python3-%{pypi_name}
95 %defattr(644,root,root,755)
96 %doc README.rst LICENSE
97 %{py3_sitescriptdir}/%{module}.py
98 %{py3_sitescriptdir}/__pycache__/%{module}.cpython-*.pyc
99 %{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info