[packages/python3-compreffor] Up to 0.6.0
arekm
arekm at pld-linux.org
Thu Nov 12 08:50:14 CET 2026
commit 168090e104f30883e2bc425470f7b5e03c8972b7
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu Nov 12 01:31:55 2026 +0100
Up to 0.6.0
compreffor-fonttools-glyphset.patch | 17 +++++++++++++++++
python3-compreffor.spec | 23 ++++++++++-------------
2 files changed, 27 insertions(+), 13 deletions(-)
---
diff --git a/python3-compreffor.spec b/python3-compreffor.spec
index 0f139c3..edd9307 100644
--- a/python3-compreffor.spec
+++ b/python3-compreffor.spec
@@ -5,17 +5,18 @@
Summary: CFF table subroutinizer for FontTools
Summary(pl.UTF-8): Generator podprocedur tablic CFF dla FontTools
Name: python3-compreffor
-Version: 0.5.6
+Version: 0.6.0
Release: 1
License: Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/compreffor/
Source0: https://files.pythonhosted.org/packages/source/c/compreffor/compreffor-%{version}.tar.gz
-# Source0-md5: dfe5e4a70eb2fef7a0bcead2a4c53952
+# Source0-md5: f8e33a2735018eab3bdbd93b5c8e1d02
+Patch0: compreffor-fonttools-glyphset.patch
URL: https://pypi.org/project/compreffor/
BuildRequires: libstdc++-devel >= 6:4.3
BuildRequires: python3-Cython >= 0.29.24
-BuildRequires: python3-devel >= 1:3.6
+BuildRequires: python3-devel >= 1:3.10
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
BuildRequires: python3-setuptools_git_ls_files
@@ -25,8 +26,7 @@ BuildRequires: python3-pytest >= 2.8
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
-BuildRequires: sed >= 4.0
-Requires: python3-modules >= 1:3.6
+Requires: python3-modules >= 1:3.10
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -37,12 +37,7 @@ Generator podprocedur tablic CFF dla FontTools.
%prep
%setup -q -n compreffor-%{version}
-
-# move out of compreffor dir, so that:
-# - `import compreffor` can search built-* dirs with binary modules instead of src
-# - we don't package tests
-%{__mv} src/python/compreffor/test tests
-%{__sed} -i -e 's/compreffor\.test\.dummy/.dummy/' tests/pyCompressor_test.py
+%patch -P0 -p1
%build
%py3_build
@@ -50,7 +45,7 @@ Generator podprocedur tablic CFF dla FontTools.
%if %{with tests}
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
-%{__python3} -m pytest tests
+%{__python3} -m pytest --pyargs compreffor
%endif
%install
@@ -63,10 +58,12 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README.rst
+%doc LICENSE README.rst
%attr(755,root,root) %{_bindir}/compreffor
%dir %{py3_sitedir}/compreffor
%attr(755,root,root) %{py3_sitedir}/compreffor/_compreffor.cpython-*.so
%{py3_sitedir}/compreffor/*.py
%{py3_sitedir}/compreffor/__pycache__
+# compreffor --check imports compreffor.test.util
+%{py3_sitedir}/compreffor/test
%{py3_sitedir}/compreffor-%{version}-py*.egg-info
diff --git a/compreffor-fonttools-glyphset.patch b/compreffor-fonttools-glyphset.patch
new file mode 100644
index 0000000..b6797b0
--- /dev/null
+++ b/compreffor-fonttools-glyphset.patch
@@ -0,0 +1,17 @@
+fontTools glyph set objects have no _glyph attribute; compreffor --check
+died with AttributeError, use the CharStrings of the glyph set instead
+
+diff -urN compreffor-0.6.0.orig/src/python/compreffor/test/util.py compreffor-0.6.0/src/python/compreffor/test/util.py
+--- compreffor-0.6.0.orig/src/python/compreffor/test/util.py 2025-12-01 15:05:02.000000000 +0100
++++ compreffor-0.6.0/src/python/compreffor/test/util.py 2026-11-12 01:30:47.027845000 +0100
+@@ -38,8 +38,8 @@
+
+ passed = True
+ for g in orig_gset.keys():
+- orig_glyph = orig_gset[g]._glyph
+- comp_glyph = comp_gset[g]._glyph
++ orig_glyph = orig_gset.charStrings[g]
++ comp_glyph = comp_gset.charStrings[g]
+ orig_glyph.decompile()
+ if not (orig_glyph.program == comp_glyph.program):
+ log.warning("Difference found in glyph '%s'" % (g,))
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-compreffor.git/commitdiff/168090e104f30883e2bc425470f7b5e03c8972b7
More information about the pld-cvs-commit
mailing list