python3Packages.srctools: use custom test script for pythoncapi-compat
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
pillow,
|
||||
pytest-regressions,
|
||||
dirty-equals,
|
||||
setuptools,
|
||||
}:
|
||||
let
|
||||
pname = "srctools";
|
||||
@@ -25,12 +26,6 @@ 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"
|
||||
@@ -52,8 +47,18 @@ buildPythonPackage {
|
||||
pillow
|
||||
pytest-regressions
|
||||
dirty-equals
|
||||
setuptools # required for pythoncapi-compat tests
|
||||
];
|
||||
|
||||
# pythoncpai-comat tests are incompatible with pytest so we run their tests manually
|
||||
# see https://github.com/python/pythoncapi-compat/pull/169
|
||||
disabledTestPaths = [
|
||||
"src/pythoncapi-compat"
|
||||
];
|
||||
postCheck = ''
|
||||
python3 src/pythoncapi-compat/runtests.py --current
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [ "srctools" ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
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
|
||||
Reference in New Issue
Block a user