From 99271ca28ef55a79b305722737a71054ca43f263 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 24 Oct 2025 14:04:55 +0000 Subject: [PATCH 1/2] python3Packages.scikit-bio: cleanup --- .../python-modules/scikit-bio/default.nix | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/scikit-bio/default.nix b/pkgs/development/python-modules/scikit-bio/default.nix index ef4e4ed9719b..10e635b53b65 100644 --- a/pkgs/development/python-modules/scikit-bio/default.nix +++ b/pkgs/development/python-modules/scikit-bio/default.nix @@ -3,24 +3,27 @@ buildPythonPackage, fetchFromGitHub, + # build-system setuptools, cython, oldest-supported-numpy, - requests, + # dependencies + array-api-compat, + biom-format, decorator, + h5py, natsort, numpy, pandas, - scipy, - h5py, - biom-format, - statsmodels, patsy, - array-api-compat, + requests, + scipy, + statsmodels, - python, + # tests pytestCheckHook, + python, }: buildPythonPackage rec { @@ -42,20 +45,22 @@ buildPythonPackage rec { ]; dependencies = [ - requests + array-api-compat + biom-format decorator + h5py natsort numpy pandas - scipy - h5py - biom-format - statsmodels patsy - array-api-compat + requests + scipy + statsmodels ]; - nativeCheckInputs = [ pytestCheckHook ]; + nativeCheckInputs = [ + pytestCheckHook + ]; # only the $out dir contains the built cython extensions, so we run the tests inside there enabledTestPaths = [ "${placeholder "out"}/${python.sitePackages}/skbio" ]; @@ -63,8 +68,10 @@ buildPythonPackage rec { pythonImportsCheck = [ "skbio" ]; meta = { - homepage = "http://scikit-bio.org/"; description = "Data structures, algorithms and educational resources for bioinformatics"; + homepage = "http://scikit-bio.org/"; + downloadPage = "https://github.com/scikit-bio/scikit-bio"; + changelog = "https://github.com/scikit-bio/scikit-bio/blob/${version}/CHANGELOG.md"; license = lib.licenses.bsd3; maintainers = with lib.maintainers; [ tomasajt ]; }; From 0d8c133ee49b412cf73cab7cda8124af49896729 Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Fri, 24 Oct 2025 14:29:59 +0000 Subject: [PATCH 2/2] python3Packages.scikit-bio: disable tests on darwin --- pkgs/development/python-modules/scikit-bio/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/scikit-bio/default.nix b/pkgs/development/python-modules/scikit-bio/default.nix index 10e635b53b65..151ae1f21f42 100644 --- a/pkgs/development/python-modules/scikit-bio/default.nix +++ b/pkgs/development/python-modules/scikit-bio/default.nix @@ -1,5 +1,6 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -65,6 +66,10 @@ buildPythonPackage rec { # only the $out dir contains the built cython extensions, so we run the tests inside there enabledTestPaths = [ "${placeholder "out"}/${python.sitePackages}/skbio" ]; + # The trick above makes test collection fail on darwin: + # PermissionError: [Errno 1] Operation not permitted: '/nix/.Trashes' + doCheck = !stdenv.hostPlatform.isDarwin; + pythonImportsCheck = [ "skbio" ]; meta = {