Skip to content

Commit 1cd3957

Browse files
authored
python3Packages.scikit-survival: fix and update (#359183)
2 parents 9a9f9a0 + c8e9bfe commit 1cd3957

File tree

1 file changed

+13
-7
lines changed
  • pkgs/development/python-modules/scikit-survival

1 file changed

+13
-7
lines changed

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

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
stdenv,
33
lib,
44
buildPythonPackage,
5-
fetchPypi,
5+
fetchFromGitHub,
66
cython,
77
ecos,
8+
eigen,
89
joblib,
910
numexpr,
1011
numpy,
@@ -18,12 +19,14 @@
1819

1920
buildPythonPackage rec {
2021
pname = "scikit-survival";
21-
version = "0.23.0";
22+
version = "0.23.1";
2223
pyproject = true;
2324

24-
src = fetchPypi {
25-
inherit pname version;
26-
hash = "sha256-JFI3SDOK74vQdoUOStYlc4e0VHps97KjV3a1NQSN6E0=";
25+
src = fetchFromGitHub {
26+
owner = "sebp";
27+
repo = "scikit-survival";
28+
rev = "refs/tags/v${version}";
29+
hash = "sha256-6902chXALa73/kTJ5UwV4CrB7/7wn+QXKpp2ej/Dnk8=";
2730
};
2831

2932
nativeBuildInputs = [
@@ -46,9 +49,12 @@ buildPythonPackage rec {
4649

4750
nativeCheckInputs = [ pytestCheckHook ];
4851

49-
# treat numpy versions as lower bounds, same as setuptools build
52+
# can remove scikit-learn after 0.23.1
5053
postPatch = ''
51-
sed -i 's/numpy==/numpy>=/' pyproject.toml
54+
ln -s ${lib.getInclude eigen}/include/eigen3/Eigen \
55+
sksurv/linear_model/src/eigen
56+
sed -i -e 's/numpy>=2.0.0/numpy/' \
57+
-e 's/scikit-learn~=1.4.0/scikit-learn/' pyproject.toml
5258
'';
5359

5460
# Hack needed to make pytest + cython work

0 commit comments

Comments
 (0)