nixpkgs/pkgs/development/python-modules/scikit-survival/default.nix

73 lines
1.3 KiB
Nix
Raw Normal View History

2020-03-12 14:06:06 +00:00
{ lib
, buildPythonPackage
, fetchPypi
, cython
, ecos
, joblib
, numexpr
, numpy
, osqp
, pandas
, setuptools-scm
, scikit-learn
2020-03-12 14:06:06 +00:00
, scipy
, pytestCheckHook
}:
buildPythonPackage rec {
pname = "scikit-survival";
version = "0.17.0";
2020-03-12 14:06:06 +00:00
src = fetchPypi {
inherit pname version;
sha256 = "ba49325f6a31e8bdccfb88337aa85218d209e88a6a704e9c41ef13bf749e0f46";
2020-03-12 14:06:06 +00:00
};
nativeBuildInputs = [
cython
setuptools-scm
2020-03-12 14:06:06 +00:00
];
propagatedBuildInputs = [
ecos
joblib
numexpr
numpy
osqp
pandas
scikit-learn
2020-03-12 14:06:06 +00:00
scipy
];
pythonImportsCheck = [ "sksurv" ];
checkInputs = [ pytestCheckHook ];
# Hack needed to make pytest + cython work
# https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298
preCheck = ''
export HOME=$(mktemp -d)
cp -r $TMP/$sourceRoot/tests $HOME
pushd $HOME
'';
postCheck = "popd";
# very long tests, unnecessary for a leaf package
disabledTests = [
"test_coxph"
"test_datasets"
"test_ensemble_selection"
"test_minlip"
"test_pandas_inputs"
"test_survival_svm"
"test_tree"
];
meta = with lib; {
description = "Survival analysis built on top of scikit-learn";
homepage = "https://github.com/sebp/scikit-survival";
license = licenses.gpl3Only;
maintainers = with maintainers; [ GuillaumeDesforges ];
};
}