[packages/python3-cffsubr] Up to 0.3.0
arekm
arekm at pld-linux.org
Thu May 22 20:38:39 CEST 2025
commit 1caa129e3961c209f700543c5c34b30240bcc7a8
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Thu May 22 20:26:17 2025 +0200
Up to 0.3.0
python3-cffsubr.spec | 50 +++++++++++++++++++++++++++-----------------------
1 file changed, 27 insertions(+), 23 deletions(-)
---
diff --git a/python3-cffsubr.spec b/python3-cffsubr.spec
index 8e149fd..562206d 100644
--- a/python3-cffsubr.spec
+++ b/python3-cffsubr.spec
@@ -6,28 +6,27 @@
Summary: Standalone CFF subroutinizer based on the AFDKO tx tool
Summary(pl.UTF-8): Samodzielny generator podprocedur CFF oparty na narzędziu tx z AFDKO
Name: python3-cffsubr
-Version: 0.2.9.post1
-Release: 5
+Version: 0.3.0
+Release: 1
License: Apache v2.0
Group: Libraries/Python
#Source0Download: https://pypi.org/simple/cffsubr/
Source0: https://files.pythonhosted.org/packages/source/c/cffsubr/cffsubr-%{version}.tar.gz
-# Source0-md5: 2e3de35a947539b76dd3e426f99373c4
+# Source0-md5: 9ea6396f228e278ff7660dc4edde4c37
URL: https://github.com/adobe-type-tools/cffsubr
-BuildRequires: python3-devel >= 1:3.6
+BuildRequires: python3-devel >= 1:3.9
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_git_ls_files
BuildRequires: python3-setuptools_scm
%if %{with tests}
+BuildRequires: adobe-afdko
BuildRequires: python3-fonttools >= 4.10.2
-%if "%{py3_ver}" == "3.6"
-BuildRequires: python3-importlib_resources
-%endif
BuildRequires: python3-pytest
%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.714
-Requires: python3-modules >= 1:3.6
+Requires: python3-modules >= 1:3.9
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
@@ -40,25 +39,31 @@ AFDKO.
%prep
%setup -q -n cffsubr-%{version}
-%build
-# prebuild tx (like setup does) but with our optflags
-%{__make} -C external/afdko/c/tx/build/linux/gcc/release \
- CC="%{__cc}" \
- XFLAGS="%{rpmcflags} %{rpmcppflags}"
-cp -dR external/afdko/c/tx/exe/linux/release/tx external/afdko/c/tx/build_all
+# Do not build the extension, which is a copy of the “tx” executable from
+# adobe-afdko. Patch out the custom build backend, which would have generated
+# dependencies needed for building the extension.
+sed -r -i 's/(ext_modules=)/# \1/' setup.py
+sed -r -i 's/^(build-backend|backend-path)/# \1/' pyproject.toml
-%py3_build
+# Remove bundled adobe-afdko:
+rm -rf external
+
+%build
+%py3_build_pyproject
%if %{with tests}
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
+ln -s %{_bindir}/tx build-3-test/cffsubr/tx
+# use explicit plugins list for reliable builds (delete PYTEST_PLUGINS if empty)
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-PYTHONPATH=$(echo $(pwd)/build-3/lib.*) \
-%{__python3} -m pytest tests
+PYTEST_PLUGINS= \
+%{__python3} -m pytest -o pythonpath="$PWD/build-3-test" tests
%endif
%install
rm -rf $RPM_BUILD_ROOT
-%py3_install
+%py3_install_pyproject
%clean
rm -rf $RPM_BUILD_ROOT
@@ -67,8 +72,7 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%doc NOTICE README.md
%attr(755,root,root) %{_bindir}/cffsubr
-%dir %{py3_sitedir}/cffsubr
-%{py3_sitedir}/cffsubr/*.py
-%{py3_sitedir}/cffsubr/__pycache__
-%attr(755,root,root) %{py3_sitedir}/cffsubr/tx
-%{py3_sitedir}/cffsubr-%{version}-py*.egg-info
+%dir %{py3_sitescriptdir}/cffsubr
+%{py3_sitescriptdir}/cffsubr/*.py
+%{py3_sitescriptdir}/cffsubr/__pycache__
+%{py3_sitescriptdir}/cffsubr-%{version}.dist-info
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-cffsubr.git/commitdiff/1caa129e3961c209f700543c5c34b30240bcc7a8
More information about the pld-cvs-commit
mailing list