python3Packages.scikit-learn: enable parallel building and testing

This commit is contained in:
DavHau 2021-05-15 15:14:01 +07:00
parent cd8f3e6c44
commit 0a1a14d13e

View File

@ -7,7 +7,8 @@
, glibcLocales , glibcLocales
, numpy , numpy
, scipy , scipy
, pytest , pytestCheckHook
, pytest-xdist
, pillow , pillow
, cython , cython
, joblib , joblib
@ -54,17 +55,30 @@ buildPythonPackage rec {
joblib joblib
threadpoolctl threadpoolctl
]; ];
checkInputs = [ pytest ];
checkInputs = [ pytestCheckHook pytest-xdist ];
LC_ALL="en_US.UTF-8"; LC_ALL="en_US.UTF-8";
doCheck = !stdenv.isAarch64; preBuild = ''
# Skip test_feature_importance_regression - does web fetch export SKLEARN_BUILD_PARALLEL=$NIX_BUILD_CORES
checkPhase = ''
cd $TMPDIR
HOME=$TMPDIR OMP_NUM_THREADS=1 pytest -k "not test_feature_importance_regression" --pyargs sklearn
''; '';
doCheck = !stdenv.isAarch64;
# Skip test_feature_importance_regression - does web fetch
disabledTests = [ "test_feature_importance_regression" ];
pytestFlagsArray = [ "-n" "$NIX_BUILD_CORES" "--pyargs" "sklearn" ];
preCheck = ''
cd $TMPDIR
export HOME=$TMPDIR
export OMP_NUM_THREADS=1
'';
pythonImportsCheck = [ "sklearn" ];
meta = with lib; { meta = with lib; {
description = "A set of python modules for machine learning and data mining"; description = "A set of python modules for machine learning and data mining";
changelog = let changelog = let