2011-08-17 22:06:50 +00:00
|
|
|
#
|
2011-08-17 22:07:01 +00:00
|
|
|
# spec file for package python-polib
|
2011-08-17 22:06:50 +00:00
|
|
|
#
|
2024-02-02 12:24:33 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2013-02-11 09:10:45 +00:00
|
|
|
# Copyright (c) 2013 LISA GmbH, Bingen, Germany.
|
2011-08-17 22:06:50 +00:00
|
|
|
#
|
2011-08-17 22:07:01 +00:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2021-06-06 12:41:04 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-08-17 22:06:50 +00:00
|
|
|
#
|
|
|
|
|
|
2012-06-13 06:04:31 +00:00
|
|
|
|
2023-08-04 11:23:24 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2011-08-17 22:06:50 +00:00
|
|
|
Name: python-polib
|
2023-11-27 19:51:25 +00:00
|
|
|
Version: 1.2.0
|
2012-02-17 11:08:56 +00:00
|
|
|
Release: 0
|
2011-08-17 22:06:50 +00:00
|
|
|
Summary: A library to manipulate gettext files
|
2011-12-06 17:57:04 +00:00
|
|
|
License: MIT
|
2021-06-06 12:41:04 +00:00
|
|
|
URL: https://github.com/izimobil/polib/
|
2017-04-24 04:14:46 +00:00
|
|
|
Source0: https://files.pythonhosted.org/packages/source/p/polib/polib-%{version}.tar.gz
|
2018-09-10 11:47:49 +00:00
|
|
|
Patch0: polib-1.1.0-fix-tests-big-endian.patch
|
2024-02-02 12:24:33 +00:00
|
|
|
BuildRequires: %{python_module Sphinx}
|
|
|
|
|
BuildRequires: %{python_module pip}
|
2024-03-18 01:45:14 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2017-04-24 04:14:46 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2024-02-02 12:24:33 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2017-12-04 09:52:40 +00:00
|
|
|
BuildRequires: fdupes
|
2018-09-10 11:47:49 +00:00
|
|
|
BuildRequires: gettext-runtime >= 0.19.8
|
2017-12-04 09:52:40 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2011-08-17 22:06:50 +00:00
|
|
|
BuildArch: noarch
|
2017-04-24 04:14:46 +00:00
|
|
|
%python_subpackages
|
2011-08-17 22:06:50 +00:00
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
polib allows you to manipulate, create, modify gettext catalogs (.pot, .po and
|
|
|
|
|
binary .mo files). You can load existing files, iterate through it's entries,
|
|
|
|
|
add, modify entries, comments or metadata, etc... or create new po/pot files
|
|
|
|
|
from scratch.
|
|
|
|
|
|
|
|
|
|
polib provides a simple and pythonic API, exporting only two convenience
|
|
|
|
|
functions 'pofile' and 'mofile', and the 4 core classes: POFile, MOFile,
|
|
|
|
|
POEntry and MOEntry for creating new files/entries.
|
|
|
|
|
|
2017-04-24 04:14:46 +00:00
|
|
|
%package -n python-polib-doc
|
|
|
|
|
Summary: A library to manipulate gettext files - documentation
|
2013-02-13 08:25:11 +00:00
|
|
|
Group: Documentation/Other
|
2017-04-24 04:14:46 +00:00
|
|
|
Provides: %{python_module polib-doc = %{version}}
|
2011-08-17 22:06:50 +00:00
|
|
|
|
2017-04-24 04:14:46 +00:00
|
|
|
%description -n python-polib-doc
|
2011-08-17 22:06:50 +00:00
|
|
|
polib allows you to manipulate, create, modify gettext catalogs (.pot, .po and
|
|
|
|
|
binary .mo files). You can load existing files, iterate through it's entries,
|
|
|
|
|
add, modify entries, comments or metadata, etc... or create new po/pot files
|
|
|
|
|
from scratch.
|
|
|
|
|
|
|
|
|
|
polib provides a simple and pythonic API, exporting only two convenience
|
|
|
|
|
functions 'pofile' and 'mofile', and the 4 core classes: POFile, MOFile,
|
|
|
|
|
POEntry and MOEntry for creating new files/entries.
|
|
|
|
|
|
2013-02-13 08:25:11 +00:00
|
|
|
This package contains documentation in HTML format.
|
|
|
|
|
|
2011-08-17 22:06:50 +00:00
|
|
|
%prep
|
2024-03-18 01:45:14 +00:00
|
|
|
%autosetup -p1 -n polib-%{version}
|
2011-08-17 22:06:50 +00:00
|
|
|
|
|
|
|
|
%build
|
2024-02-02 12:24:33 +00:00
|
|
|
%pyproject_wheel
|
2017-04-24 04:14:46 +00:00
|
|
|
|
2011-08-17 22:06:50 +00:00
|
|
|
pushd docs
|
2018-01-25 15:45:53 +00:00
|
|
|
make %{?_smp_mflags} html
|
2011-08-17 22:06:50 +00:00
|
|
|
rm _build/html/.buildinfo
|
|
|
|
|
popd
|
|
|
|
|
|
|
|
|
|
%install
|
2024-02-02 12:24:33 +00:00
|
|
|
%pyproject_install
|
2017-04-24 04:14:46 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2011-08-17 22:06:50 +00:00
|
|
|
|
2012-06-13 06:04:31 +00:00
|
|
|
%check
|
2024-03-18 01:45:14 +00:00
|
|
|
# https://github.com/izimobil/polib/issues/150
|
|
|
|
|
%pytest tests/tests.py -k 'not (test_save_as_mofile or test_is_file)'
|
2012-06-13 06:04:31 +00:00
|
|
|
|
2017-04-24 04:14:46 +00:00
|
|
|
%files %{python_files}
|
2018-09-10 11:47:49 +00:00
|
|
|
%license LICENSE
|
|
|
|
|
%doc CHANGELOG README.rst
|
2024-02-02 12:24:33 +00:00
|
|
|
%{python_sitelib}/polib.py
|
|
|
|
|
%pycache_only %{python_sitelib}/__pycache__/polib.*pyc
|
|
|
|
|
%{python_sitelib}/polib-%{version}.dist-info
|
2011-08-17 22:06:50 +00:00
|
|
|
|
2017-04-24 04:14:46 +00:00
|
|
|
%files -n python-polib-doc
|
2011-08-17 22:06:50 +00:00
|
|
|
%doc docs/_build/html
|
|
|
|
|
|
|
|
|
|
%changelog
|