[packages/python-polib] new, version 1.0.7
glen
glen at pld-linux.org
Sun Nov 12 14:24:52 CET 2017
commit 27d9f0c1d28046812ce2dd624a63c8cb44822960
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Sun Nov 12 15:23:53 2017 +0200
new, version 1.0.7
based on fedora package, a964431
python-polib.spec | 100 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 100 insertions(+)
---
diff --git a/python-polib.spec b/python-polib.spec
new file mode 100644
index 0000000..9616620
--- /dev/null
+++ b/python-polib.spec
@@ -0,0 +1,100 @@
+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+%bcond_without python2 # CPython 2.x module
+%bcond_without python3 # CPython 3.x module
+
+%define module polib
+%define egg_name polib
+%define pypi_name polib
+Summary: A library to parse and manage gettext catalogs
+Name: python-%{pypi_name}
+Version: 1.0.7
+Release: 1
+License: MIT
+Source0: http://bitbucket.org/izi/polib/get/%{version}.tar.gz
+# Source0-md5: 270110a7010425738e9a08832c5cba4f
+Group: Libraries/Python
+URL: http://bitbucket.org/izi/polib/
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with python2}
+BuildRequires: python-modules
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-modules
+BuildRequires: python3-setuptools
+%endif
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%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.
+
+%package -n python3-%{pypi_name}
+Summary: A library to parse and manage gettext catalogs
+Group: Libraries/Python
+
+%description -n python3-%{pypi_name}
+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 -qc
+mv izi-polib-d75ce6dbbc2a/* .
+
+%build
+%if %{with python2}
+%py_build %{?with_tests:test}
+%endif
+
+%if %{with python3}
+%py3_build %{?with_tests:test}
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+%if %{with python2}
+%py_install
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc README.rst LICENSE
+%{py_sitescriptdir}/%{module}.py[co]
+%{py_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-%{pypi_name}
+%defattr(644,root,root,755)
+%doc README.rst LICENSE
+%{py3_sitescriptdir}/%{module}.py
+%{py3_sitescriptdir}/__pycache__/%{module}.cpython-*.pyc
+%{py3_sitescriptdir}/%{egg_name}-%{version}-py*.egg-info
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-polib.git/commitdiff/27d9f0c1d28046812ce2dd624a63c8cb44822960
More information about the pld-cvs-commit
mailing list