python3Packages.srctools: fix build failure due to meson-python & pythoncapi-compat (#493800)

This commit is contained in:
isabel
2026-02-25 00:44:08 +00:00
committed by GitHub
2 changed files with 24 additions and 0 deletions
@@ -25,6 +25,17 @@ buildPythonPackage {
hash = "sha256-c+NmrTntpNTEI782aoC4bNpoKpWe4cqSAkxpYS5HH30=";
};
# TODO remove when https://github.com/python/pythoncapi-compat/pull/169 is merged
# and new srctools version is released with fix
patches = [
./fix-tests.diff
];
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "meson-python == 0.18.0" "meson-python >= 0.18.0"
'';
build-system = [
meson
meson-python
@@ -0,0 +1,13 @@
diff --git a/src/pythoncapi-compat/tests/test_pythoncapi_compat.py b/src/pythoncapi-compat/tests/test_pythoncapi_compat.py
index 8480415..4137489 100644
--- a/src/pythoncapi-compat/tests/test_pythoncapi_compat.py
+++ b/src/pythoncapi-compat/tests/test_pythoncapi_compat.py
@@ -21,7 +21,7 @@ except ImportError:
faulthandler = None
# test.utils
-from utils import run_command, command_stdout
+from .utils import run_command, command_stdout
# Windows uses MSVC compiler