python3Packages.kaggle: add versionCheckHook

This commit is contained in:
Gaetan Lepage
2026-08-13 11:26:17 +00:00
parent d8923d3639
commit 331ebf48d7

View File

@@ -1,5 +1,6 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
@@ -22,6 +23,7 @@
# tests
pytestCheckHook,
versionCheckHook,
writableTmpDirAsHomeHook,
}:
@@ -57,9 +59,14 @@ buildPythonPackage (finalAttrs: {
nativeCheckInputs = [
pytestCheckHook
versionCheckHook
# kaggle creates its config dir at import time; needs a writable HOME.
writableTmpDirAsHomeHook
];
versionCheckKeepEnvironment = lib.optionals stdenv.hostPlatform.isDarwin [
# PermissionError: [Errno 1] Operation not permitted: '/var/empty/.kaggle'
"HOME"
];
# kaggle authenticates at import time; fake creds for the offline checks.
env = {