!9 [sync] PR-8: Add build require gettext and fix test case test_save_as_mofile

From: @openeuler-sync-bot 
Reviewed-by: @dillon_chen 
Signed-off-by: @dillon_chen
This commit is contained in:
openeuler-ci-bot 2024-06-07 03:26:34 +00:00 committed by Gitee
commit c125171ba8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 18 additions and 2 deletions

View File

@ -0,0 +1,12 @@
diff -Nur a/tests/tests.py b/tests/tests.py
--- a/tests/tests.py 2023-02-24 01:02:41.000000000 +0800
+++ b/tests/tests.py 2024-06-06 11:09:59.961135920 +0800
@@ -643,7 +643,7 @@
os.close(fd)
po = polib.pofile(reffile, autodetect_encoding=False, encoding=encoding)
po.save_as_mofile(tmpfile1)
- subprocess.call([msgfmt, '--no-hash', '-o', tmpfile2, reffile])
+ subprocess.call([msgfmt, '--no-convert', '--no-hash', '-o', tmpfile2, reffile])
try:
f = open(tmpfile1, 'rb')
s1 = f.read()

View File

@ -1,12 +1,13 @@
Name: python-polib
Version: 1.2.0
Release: 1
Release: 2
Summary: A library to manipulate gettext files (po and mo files)
License: MIT
URL: https://pypi.org/project/polib/
Source0: https://pypi.python.org/packages/source/p/polib/polib-%{version}.tar.gz
Patch0: msgfmt-dont-convert-the-messages-to-UTF-8-encoding.patch
BuildRequires: python3-devel
BuildRequires: python3-devel gettext
BuildArch: noarch
%description
@ -42,6 +43,9 @@ rm -rf polib.egg-info
%{python3_sitelib}/*
%changelog
* Thu Jun 6 2024 wangqiang <wangqiang1@kylinos.con> - 1.2.0-2
- Add build require gettext, and fix test case test_save_as_mofile
* Tue Aug 22 2023 wulei <wu_lei@hoperun.com> - 1.2.0-1
- Update to 1.2.0