File python-pyglossary.spec of Package python-pyglossary
#
# spec file for package python-pyglossary
#
# Copyright (c) 2026 SUSE LLC
#
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: python-pyglossary
Version: 5.2.1
Release: 0
Summary: A tool for converting dictionary files aka glossaries
License: GPL-3.0-or-later
URL: https://github.com/ilius/pyglossary
Source: https://files.pythonhosted.org/packages/source/p/pyglossary/pyglossary-%{version}.tar.gz
BuildRequires: python-rpm-macros
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libzim)
BuildRequires: python3-base >= 3.11
BuildRequires: python3-pip
BuildRequires: python3-tk
BuildRequires: python3-setuptools >= 77.0.3
BuildRequires: python3-PyICU
BuildRequires: python3-PyYAML
BuildRequires: python3-lxml
BuildRequires: python3-python-lzo
BuildRequires: python3-beautifulsoup4
BuildRequires: python3-html5lib
BuildRequires: python3-gobject
BuildRequires: python3-biplist
# BuildRequires: %%python3-colorize-pinyin
BuildRequires: python3-mistune
BuildRequires: python3-polib
BuildRequires: python3-prompt_toolkit
# BuildRequires: %%python3-pymorphy3
# BuildRequires: %%python3-python-romkan-ng
BuildRequires: python3-xxhash
# TODO still unpackaged marisa-trie
BuildRequires: git
BuildRequires: fdupes
BuildArch: noarch
%description
A tool for converting dictionary files aka glossaries.
The primary purpose is to be able to use our offline glossaries in any
Open Source dictionary we like on any OS/device.
There are countless formats, and my time is limited, so I implement
formats that seem more useful for myself, or for Open Source community.
Also diversity of languages is taken into account. Pull requests are
welcome.
%prep
%autosetup -p1 -n pyglossary-%{version}
%build
%python3_pyproject_wheel
%install
%python3_pyproject_install
# Remove tests
rm -rf %{buildroot}%{python3_sitelib}/tests
%fdupes %{buildroot}%{python3_sitelib}
%check
export PYTHONPATH=%{buildroot}%{python3_sitelib} PYTHONDONTWRITEBYTECODE=1
# Test data need to be downloaded from
# https://github.com/ilius/pyglossary-test
# python3 -m unittest discover -vv -p '*_test.py' tests/
%files
%license LICENSE AUTHORS
%{_bindir}/pyglossary
%{_bindir}/pyglossary-diff
%{_bindir}/pyglossary-view
%{_datadir}/pyglossary
%{python3_sitelib}/pyglossary
%{python3_sitelib}/pyglossary-%{version}.dist-info
%changelog