python3Packages.scikit-survival: 0.24.1 -> 0.25.0 (#445334)

This commit is contained in:
Gaétan Lepage
2025-09-22 22:20:26 +00:00
committed by GitHub

View File

@@ -1,40 +1,57 @@
{ {
stdenv,
lib, lib,
stdenv,
buildPythonPackage, buildPythonPackage,
fetchFromGitHub, fetchFromGitHub,
cython,
ecos,
eigen, eigen,
# build-system
cython,
numpy,
packaging,
scikit-learn,
setuptools,
setuptools-scm,
# dependencies
ecos,
joblib, joblib,
numexpr, numexpr,
numpy,
osqp, osqp,
pandas, pandas,
setuptools-scm,
scikit-learn,
scipy, scipy,
# tests
pytestCheckHook, pytestCheckHook,
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "scikit-survival"; pname = "scikit-survival";
version = "0.24.1"; version = "0.25.0";
pyproject = true; pyproject = true;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "sebp"; owner = "sebp";
repo = "scikit-survival"; repo = "scikit-survival";
tag = "v${version}"; tag = "v${version}";
hash = "sha256-El5q2eE6wJKg/8rcFZPZQl7MVxw1jMsggjiCJHj7il8="; hash = "sha256-OvdmZ2vDptYB2tq7OtokIQzjKzhQBWwnXZLW0m6FqlI=";
}; };
nativeBuildInputs = [ postPatch = ''
ln -s ${lib.getInclude eigen}/include/eigen3/Eigen \
sksurv/linear_model/src/eigen
'';
build-system = [
cython cython
numpy
packaging
scikit-learn
setuptools
setuptools-scm setuptools-scm
]; ];
propagatedBuildInputs = [ dependencies = [
ecos ecos
joblib joblib
numexpr numexpr
@@ -49,22 +66,14 @@ buildPythonPackage rec {
nativeCheckInputs = [ pytestCheckHook ]; nativeCheckInputs = [ pytestCheckHook ];
postPatch = ''
ln -s ${lib.getInclude eigen}/include/eigen3/Eigen \
sksurv/linear_model/src/eigen
'';
# Hack needed to make pytest + cython work # Hack needed to make pytest + cython work
# https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298 # https://github.com/NixOS/nixpkgs/pull/82410#issuecomment-827186298
preCheck = '' preCheck = ''
export HOME=$(mktemp -d) rm -rf sksurv
cp -r $TMP/$sourceRoot/tests $HOME
pushd $HOME
''; '';
postCheck = "popd";
# very long tests, unnecessary for a leaf package
disabledTests = [ disabledTests = [
# very long tests, unnecessary for a leaf package
"test_coxph" "test_coxph"
"test_datasets" "test_datasets"
"test_ensemble_selection" "test_ensemble_selection"
@@ -73,16 +82,17 @@ buildPythonPackage rec {
"test_survival_svm" "test_survival_svm"
"test_tree" "test_tree"
] ]
++ ++ lib.optionals (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) [
lib.optional (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
# floating point mismatch on aarch64 # floating point mismatch on aarch64
# 27079905.88052468 to far from 27079905.880496684 # 27079905.88052468 to far from 27079905.880496684
"test_coxnet"; "test_coxnet"
];
meta = with lib; { meta = {
description = "Survival analysis built on top of scikit-learn"; description = "Survival analysis built on top of scikit-learn";
homepage = "https://github.com/sebp/scikit-survival"; homepage = "https://github.com/sebp/scikit-survival";
license = licenses.gpl3Only; changelog = "https://github.com/sebp/scikit-survival/releases/tag/v${version}";
maintainers = with maintainers; [ GuillaumeDesforges ]; license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ GuillaumeDesforges ];
}; };
} }