!16 [sync] PR-11: Fix autofix_for_release.py noto_lint.py scripts error
From: @openeuler-sync-bot Reviewed-by: @lyn1001 Signed-off-by: @lyn1001
This commit is contained in:
commit
37d7fdb28f
@ -3,11 +3,12 @@
|
|||||||
|
|
||||||
Name: nototools
|
Name: nototools
|
||||||
Version: 0.2.17
|
Version: 0.2.17
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: Noto fonts support tools and scripts plus web site generation
|
Summary: Noto fonts support tools and scripts plus web site generation
|
||||||
License: ASL 2.0
|
License: Apache-2.0
|
||||||
URL: https://github.com/googlei18n/nototools
|
URL: https://github.com/googlei18n/nototools
|
||||||
Source0: https://github.com/googlei18n/nototools/archive/%{commit0}/nototools-%{shortcommit0}.tar.gz
|
Source0: https://github.com/googlei18n/nototools/archive/%{commit0}/nototools-%{shortcommit0}.tar.gz
|
||||||
|
Patch0: remove-requireReal-arg-for-fonttools-4.27.0.patch
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python3-devel python-setuptools python3-wheel python3-setuptools_scm
|
BuildRequires: python3-devel python-setuptools python3-wheel python3-setuptools_scm
|
||||||
Requires: python3-nototools = %{version}-%{release}
|
Requires: python3-nototools = %{version}-%{release}
|
||||||
@ -30,7 +31,10 @@ BuildRequires: python3dist(fonttools)
|
|||||||
The tools package contains python3 scripts.
|
The tools package contains python3 scripts.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -c -p0
|
%autosetup -c -p1
|
||||||
|
|
||||||
|
# fix module 'nototools.notoconfig' has no attribute 'values'
|
||||||
|
sed -i 's/notoconfig.values/notoconfig._values/g' */nototools/autofix_for_release.py
|
||||||
|
|
||||||
rm -rf nototools-%{commit0}/third_party/{cldr,dspl,fontcrunch,ohchr,spiro,udhr,unicode}
|
rm -rf nototools-%{commit0}/third_party/{cldr,dspl,fontcrunch,ohchr,spiro,udhr,unicode}
|
||||||
mv %{name}-%{commit0} python3
|
mv %{name}-%{commit0} python3
|
||||||
@ -69,6 +73,9 @@ cd ..
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 28 2024 wangkai <13474090681@163.com> - 0.2.17-2
|
||||||
|
- Fix autofix_for_release.py noto_lint.py scripts error
|
||||||
|
|
||||||
* Thu Sep 15 2022 lutcunpeng <lutkunpeng@163.com> - 0.2.17-1
|
* Thu Sep 15 2022 lutcunpeng <lutkunpeng@163.com> - 0.2.17-1
|
||||||
- DESC: update to 0.2.17
|
- DESC: update to 0.2.17
|
||||||
|
|
||||||
|
|||||||
31
remove-requireReal-arg-for-fonttools-4.27.0.patch
Normal file
31
remove-requireReal-arg-for-fonttools-4.27.0.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
diff --git a/nototools-cd79db632c9a506ad61ae72bfad5875341ca56b8/nototools/compare_fonts.py b/nototools-cd79db632c9a506ad61ae72bfad5875341ca56b8/nototools/compare_fonts.py
|
||||||
|
index b0b9379..48a1746 100755
|
||||||
|
--- a/nototools-cd79db632c9a506ad61ae72bfad5875341ca56b8/nototools/compare_fonts.py
|
||||||
|
+++ b/nototools-cd79db632c9a506ad61ae72bfad5875341ca56b8/nototools/compare_fonts.py
|
||||||
|
@@ -182,10 +182,10 @@ class FontCompare(object):
|
||||||
|
return result
|
||||||
|
|
||||||
|
def _test_gid(self, cp):
|
||||||
|
- return self.test.getGlyphID(self.test_cmap[cp], requireReal=True)
|
||||||
|
+ return self.test.getGlyphID(self.test_cmap[cp])
|
||||||
|
|
||||||
|
def _target_gid(self, cp):
|
||||||
|
- return self.target.getGlyphID(self.target_cmap[cp], requireReal=True)
|
||||||
|
+ return self.target.getGlyphID(self.target_cmap[cp])
|
||||||
|
|
||||||
|
def _cp_error_msg(self, cp, test_msg, target_msg):
|
||||||
|
test_gid = self._test_gid(cp)
|
||||||
|
diff --git a/nototools-cd79db632c9a506ad61ae72bfad5875341ca56b8/nototools/noto_lint.py b/nototools-cd79db632c9a506ad61ae72bfad5875341ca56b8/nototools/noto_lint.py
|
||||||
|
index 4951832..4c902f1 100755
|
||||||
|
--- a/nototools-cd79db632c9a506ad61ae72bfad5875341ca56b8/nototools/noto_lint.py
|
||||||
|
+++ b/nototools-cd79db632c9a506ad61ae72bfad5875341ca56b8/nototools/noto_lint.py
|
||||||
|
@@ -1380,7 +1380,7 @@ def check_font(
|
||||||
|
cmap = font_data.get_cmap(font)
|
||||||
|
for cp in lint_config.parse_int_ranges(WIN_ANSI_CODEPOINTS, True):
|
||||||
|
if cp in cmap:
|
||||||
|
- tmp_gids.add(font.getGlyphID(cmap[cp], requireReal=True))
|
||||||
|
+ tmp_gids.add(font.getGlyphID(cmap[cp]))
|
||||||
|
win_ansi_gids = frozenset(tmp_gids)
|
||||||
|
|
||||||
|
font_ymin = None
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user