treewide: use writableTmpDirAsHomeHook (#378110)

This commit is contained in:
Gaétan Lepage
2025-01-31 10:34:59 +01:00
committed by GitHub
14 changed files with 65 additions and 69 deletions
@@ -21,12 +21,14 @@
torch,
# tests
addBinToPathHook,
evaluate,
parameterized,
pytest7CheckHook,
transformers,
config,
cudatoolkit,
writableTmpDirAsHomeHook,
}:
buildPythonPackage rec {
@@ -56,19 +58,17 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
addBinToPathHook
evaluate
parameterized
pytest7CheckHook
transformers
writableTmpDirAsHomeHook
];
preCheck =
''
export HOME=$(mktemp -d)
export PATH=$out/bin:$PATH
''
+ lib.optionalString config.cudaSupport ''
export TRITON_PTXAS_PATH="${cudatoolkit}/bin/ptxas"
'';
preCheck = lib.optionalString config.cudaSupport ''
export TRITON_PTXAS_PATH="${cudatoolkit}/bin/ptxas"
'';
pytestFlagsArray = [ "tests" ];
disabledTests =
[