2019-08-29 02:08:31 +00:00
#
# spec file for package python-dragonmapper
#
2023-04-21 14:42:35 +00:00
# Copyright (c) 2023 SUSE LLC
2019-08-29 02:08:31 +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-12-09 16:51:27 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
2019-08-29 02:08:31 +00:00
2023-04-21 14:42:35 +00:00
%{?sle15_python_module_pythons}
2019-08-29 02:08:31 +00:00
Name : python-dragonmapper
Version : 0.2.6
Release : 0
Summary : Identification and conversion functions for Chinese text processing
2023-11-23 15:18:51 +00:00
License : MIT
2019-08-29 02:08:31 +00:00
Group : Development/Languages/Python
2023-11-23 15:18:51 +00:00
URL : https://github.com/tsroten/dragonmapper
2019-08-29 02:08:31 +00:00
Source : https://github.com/tsroten/dragonmapper/archive/v%{version} .tar.gz#/dragonmapper-%{version}.tar.gz
2023-11-23 15:18:51 +00:00
# PATCH-FIX-UPSTREAM 31-fix-erroneous-IPA-you-yong.patch gh#tsroten/dragonmapper#25 mcepl@suse.com
# Fix incorrect IPA
Patch0 : 31-fix-erroneous-IPA-you-yong.patch
BuildRequires : %{python_module pip}
2021-12-09 16:51:27 +00:00
BuildRequires : %{python_module pytest}
2019-08-29 02:08:31 +00:00
BuildRequires : %{python_module setuptools}
2023-11-23 15:18:51 +00:00
BuildRequires : %{python_module wheel}
BuildRequires : fdupes
2021-12-09 16:51:27 +00:00
BuildRequires : python-rpm-macros
2023-11-23 15:18:51 +00:00
Requires : python-hanzidentifier >= 1.0.2
Requires : python-zhon >= 1.1.3
BuildArch : noarch
2019-08-29 02:08:31 +00:00
# SECTION test requirements
BuildRequires : %{python_module hanzidentifier >= 1.0.2}
BuildRequires : %{python_module zhon >= 1.1.3}
# /SECTION
%python_subpackages
%description
Identification and conversion functions for Chinese text processing.
%prep
2023-11-23 15:18:51 +00:00
%autosetup -p1 -n dragonmapper-%{version}
2019-08-29 02:08:31 +00:00
mv dragonmapper/tests/test-hanzi.py dragonmapper/tests/test_hanzi.py
mv dragonmapper/tests/test-transcriptions.py dragonmapper/tests/test_transcriptions.py
%build
2023-11-23 15:18:51 +00:00
%pyproject_wheel
2019-08-29 02:08:31 +00:00
%install
2023-11-23 15:18:51 +00:00
%pyproject_install
2019-08-29 02:08:31 +00:00
%python_expand %fdupes %{buildroot} %{$python_sitelib}
%check
export LANG=en_US.UTF-8
2023-11-23 15:18:51 +00:00
# skips because of gh#tsroten/dragonmapper#35
%pytest -k 'not (test_identify or test_is_ipa or test_is_pinyin or test_is_pinyin_compatible or test_accented_to_numbered or test_numbered_to_accented)' dragonmapper/tests
2019-08-29 02:08:31 +00:00
%files %{python_files}
%doc AUTHORS.rst CHANGES.rst README.rst
%license LICENSE.txt
2023-11-23 15:18:51 +00:00
%{python_sitelib} /dragonmapper
%{python_sitelib} /dragonmapper-%{version} *-info
2019-08-29 02:08:31 +00:00
%changelog