From 7fb9188499adaeae51ebb033ded201e875e1d41e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 9 Jan 2025 21:57:05 +0100 Subject: [PATCH] gnu: python-scanpy: Patch anndata version check. * gnu/packages/bioinformatics.scm (python-scanpy)[arguments]: Add phase 'patch-version-check. Change-Id: I0d2262197ae05c785fc65bd22e8052764434cab3 --- gnu/packages/bioinformatics.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 7e3f39bd5773dd7ccfe5fd5bb837ef0a30d740eb..c1d47a7e3625e9be8b7fd16b1c057d35bf318ead 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -18906,6 +18906,16 @@ implementation differs in these ways: " and not test_clip")) #:phases #~(modify-phases %standard-phases + ;; XXX This should not be necessary, but I noticed while building + ;; python-metacells that the anndata version check fails, resulting + ;; in the wrong module name to be loaded from anndata. I cannot + ;; reproduce this in an interactive Python session. We patch this + ;; here to ensure that the appropriate module name is used. + (add-after 'unpack 'patch-version-check + (lambda _ + (substitute* "src/scanpy/_utils/__init__.py" + (("Version\\(anndata_version\\) >= Version\\(\"0.10.0\"\\):") + "True:")))) (add-after 'unpack 'pretend-version (lambda _ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))