mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
python3Packages.kaggle: add versionCheckHook
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user