Add build require gettext and fix test case test_save_as_mofile
(cherry picked from commit fa75feb119ad7e0f75a0047907278444c2a9124c)
This commit is contained in:
parent
70b7736661
commit
55ad7871bd
12
msgfmt-dont-convert-the-messages-to-UTF-8-encoding.patch
Normal file
12
msgfmt-dont-convert-the-messages-to-UTF-8-encoding.patch
Normal 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()
|
||||||
@ -1,12 +1,13 @@
|
|||||||
Name: python-polib
|
Name: python-polib
|
||||||
Version: 1.2.0
|
Version: 1.2.0
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: A library to manipulate gettext files (po and mo files)
|
Summary: A library to manipulate gettext files (po and mo files)
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://pypi.org/project/polib/
|
URL: https://pypi.org/project/polib/
|
||||||
Source0: https://pypi.python.org/packages/source/p/polib/polib-%{version}.tar.gz
|
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
|
BuildArch: noarch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -42,6 +43,9 @@ rm -rf polib.egg-info
|
|||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
|
|
||||||
%changelog
|
%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
|
* Tue Aug 22 2023 wulei <wu_lei@hoperun.com> - 1.2.0-1
|
||||||
- Update to 1.2.0
|
- Update to 1.2.0
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user