Date: Thu, 02 Apr 2026 15:42:15 +0000 From: Kai Knoblich <kai@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 04bcfa800827 - main - games/anki: Remove py-ruff from BUILD_DEPENDS Message-ID: <69ce8e57.42313.78a0da8@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by kai: URL: https://cgit.FreeBSD.org/ports/commit/?id=04bcfa80082776584846b809bb7768d187161a69 commit 04bcfa80082776584846b809bb7768d187161a69 Author: Kai Knoblich <kai@FreeBSD.org> AuthorDate: 2026-04-02 15:41:40 +0000 Commit: Kai Knoblich <kai@FreeBSD.org> CommitDate: 2026-04-02 15:41:40 +0000 games/anki: Remove py-ruff from BUILD_DEPENDS * devel/py-ruff is used for the generated "hooks.py" to format it accordingly, which makes little sense on the downstream side in terms of packaging. --- games/anki/Makefile | 1 - games/anki/files/patch-pylib_tools_hookslib.py | 36 +++++--------------------- 2 files changed, 7 insertions(+), 30 deletions(-) diff --git a/games/anki/Makefile b/games/anki/Makefile index 8b22fa85c2f7..4766fecb9c14 100644 --- a/games/anki/Makefile +++ b/games/anki/Makefile @@ -23,7 +23,6 @@ BUILD_DEPENDS= protoc:devel/protobuf \ ${PYTHON_PKGNAMEPREFIX}black>0:devel/py-black@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}hatchling>0:devel/py-hatchling@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}mypy-protobuf>=1.21:devel/py-mypy-protobuf@${PY_FLAVOR} \ - ${PYTHON_PKGNAMEPREFIX}ruff>0:devel/py-ruff@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} LIB_DEPENDS= libzstd.so:archivers/zstd RUN_DEPENDS= lame:audio/lame \ diff --git a/games/anki/files/patch-pylib_tools_hookslib.py b/games/anki/files/patch-pylib_tools_hookslib.py index 8abac8c7ba0e..3d119140b5a6 100644 --- a/games/anki/files/patch-pylib_tools_hookslib.py +++ b/games/anki/files/patch-pylib_tools_hookslib.py @@ -1,36 +1,14 @@ -Skip code formatting with "ruff" on !FreeBSD RELEASE builds to prevent -following error (observed with FreeBSD 15.0-CURRENT n278368-5c9b1c7e5f27): +Remove dependency on devel/py-ruff used to format the generated hooks.py +file as it is not relevant in a packaging use case. -[...] -FAILED: /wrkdirs/usr/ports/games/anki/work/anki-25.07.2/out/qt/_aqt/hooks.py -/wrkdirs/usr/ports/games/anki/work/anki-25.07.2/out/rust/release/runner run /wrkdirs/usr/ports/games/anki/work/anki-25.07.2/out/pyenv/bin/python qt/tools/genhooks_gui.py /wrkdirs/usr/ports/games/anki/work/anki-25.07.2/out/qt/_aqt/hooks.py -<jemalloc>: jemalloc_tsd.c:190: Failed assertion: "!tsd_in_nominal_list(tsd)" -Traceback (most recent call last): - File "/wrkdirs/usr/ports/games/anki/work/anki-25.07.2/qt/tools/genhooks_gui.py", line 1381, in <module> - write_file(path, hooks, prefix, suffix) - File "/wrkdirs/usr/ports/games/anki/work/anki-25.07.2/pylib/tools/hookslib.py", line 208, in write_file - subprocess.run([sys.executable, "-m", "ruff", "format", "-q", path], check=True) - File "/usr/local/lib/python3.11/subprocess.py", line 571, in run - raise CalledProcessError(retcode, process.args, - subprocess.CalledProcessError: Command '['/wrkdirs/usr/ports/games/anki/work/anki-25.07.2/out/pyenv/bin/python', '-m', 'ruff', 'format', '-q', '/wrkdirs/usr/ports/games/anki/work/anki-25.07.2/out/qt/_aqt/hooks.py']' died with <Signals.SIGABRT: 6>. - Failed with code Some(1): /wrkdirs/usr/ports/games/anki/work/anki-25.07.2/out/pyenv/bin/python qt/tools/genhooks_gui.py /wrkdirs/usr/ports/games/anki/work/anki-25.07.2/out/qt/_aqt/hooks.py -[...] +Obtained from: ---- pylib/tools/hookslib.py.orig 2025-07-09 11:37:00 UTC +https://gitlab.alpinelinux.org/alpine/aports/-/raw/3.23-stable/community/anki/strip-formatter-deps.patch + +--- pylib/tools/hookslib.py.orig 2025-09-17 06:50:13 UTC +++ pylib/tools/hookslib.py -@@ -7,6 +7,7 @@ from __future__ import annotations - - from __future__ import annotations - -+import platform - import subprocess - import sys - from dataclasses import dataclass -@@ -205,4 +206,6 @@ def write_file(path: str, hooks: list[Hook], prefix: s +@@ -205,4 +205,3 @@ def write_file(path: str, hooks: list[Hook], prefix: s with open(path, "wb") as file: file.write(code.encode("utf8")) - subprocess.run([sys.executable, "-m", "ruff", "format", "-q", path], check=True) -+ -+ if platform.system() == 'FreeBSD' and platform.release().endswith('-RELEASE'): -+ subprocess.run([sys.executable, "-m", "ruff", "format", "-q", path], check=True)home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ce8e57.42313.78a0da8>
