diff mbox series

[bug#48774] Fix build of python-scanpy

Message ID 4ee322e7-2aaf-750a-bee7-4bbc8d7bd64b@gnu.org
State Accepted
Headers show
Series [bug#48774] Fix build of python-scanpy | expand

Commit Message

Roel Janssen June 1, 2021, 8:33 a.m. UTC
Dear Guix,

The attached two patches update python-anndata and python-scanpy, which 
effectively fix the build for python-scanpy.

python-anndata switched to a PEP518 setup instead of the regular Python 
"setup.py" approach.  So with some help on IRC, I added custom phases 
inspired by the python-tinycss2 package.

Kind regards,
Roel Janssen

Comments

Mathieu Othacehe June 4, 2021, 11:54 a.m. UTC | #1
Hello Roel,

> The attached two patches update python-anndata and python-scanpy, which
> effectively fix the build for python-scanpy.

Both patches look fine to me.

Thanks,

Mathieu
Roel Janssen June 4, 2021, 9:58 p.m. UTC | #2
Hi Mathieu,

On Fri, 2021-06-04 at 13:54 +0200, Mathieu Othacehe wrote:
> 
> Hello Roel,
> 
> > The attached two patches update python-anndata and python-scanpy,
> > which
> > effectively fix the build for python-scanpy.
> 
> Both patches look fine to me.
> 

Thanks for looking at them!  I rebuilt python-scanpy with these patches
on the latest master, and pushed these patches.

Kind regards,
Roel Janssen
diff mbox series

Patch

From 094705a4ee2c46e8ed1b98c39c03b2a21c688c5e Mon Sep 17 00:00:00 2001
From: Roel Janssen <roel@gnu.org>
Date: Tue, 1 Jun 2021 10:25:12 +0200
Subject: [PATCH 2/2] gnu: python-scanpy: Update to 1.7.2.

* gnu/packages/bioinformatics.scm (python-scanpy): Update to 1.7.2.
---
 gnu/packages/bioinformatics.scm | 25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1f018befe6..2b64a04150 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -122,6 +122,7 @@ 
   #:use-module (gnu packages popt)
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-compression)
   #:use-module (gnu packages python-science)
@@ -11096,14 +11097,14 @@  in RNA-seq data.")
 (define-public python-scanpy
   (package
     (name "python-scanpy")
-    (version "1.4.6")
+    (version "1.7.2")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "scanpy" version))
        (sha256
         (base32
-         "0s2b6cvaigx4wzw3850qb93sjwwxbzh22kpbp498zklc5rjpbz4l"))))
+         "0c66adnfizsyk0h8bv2yhmay876z0klpxwpn4z6m71wly7yplpmd"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
@@ -11114,12 +11115,25 @@  in RNA-seq data.")
              (delete-file-recursively "scanpy/tests/notebooks")
              (delete-file "scanpy/tests/test_clustering.py")
              (delete-file "scanpy/tests/test_datasets.py")
+             (delete-file "scanpy/tests/test_highly_variable_genes.py")
 
              ;; TODO: I can't get the plotting tests to work, even with Xvfb.
              (delete-file "scanpy/tests/test_plotting.py")
              (delete-file "scanpy/tests/test_preprocessing.py")
              (delete-file "scanpy/tests/test_read_10x.py")
 
+             ;; The following tests need anndata.tests, which aren't included
+             ;; in the final python-anndata package.
+             (delete-file "scanpy/tests/test_combat.py")
+             (delete-file "scanpy/tests/test_embedding_plots.py")
+             (delete-file "scanpy/tests/test_normalization.py")
+             (delete-file "scanpy/tests/test_pca.py")
+             (delete-file "scanpy/tests/external/test_scrublet.py")
+
+             ;; The following tests requires 'scanorama', which isn't
+             ;; packaged yet.
+             (delete-file "scanpy/tests/external/test_scanorama_integrate.py")
+
              (setenv "PYTHONPATH"
                      (string-append (getcwd) ":"
                                     (getenv "PYTHONPATH")))
@@ -11144,11 +11158,14 @@  in RNA-seq data.")
        ("python-seaborn" ,python-seaborn)
        ("python-statsmodels" ,python-statsmodels)
        ("python-tables" ,python-tables)
+       ("python-pytoml" ,python-pytoml)
        ("python-tqdm" ,python-tqdm)
        ("python-umap-learn" ,python-umap-learn)))
     (native-inputs
-     `(("python-pytest" ,python-pytest)
-       ("python-setuptools-scm" ,python-setuptools-scm)))
+     `(("python-leidenalg" ,python-leidenalg)
+       ("python-pytest" ,python-pytest)
+       ("python-setuptools-scm" ,python-setuptools-scm)
+       ("python-sinfo" ,python-sinfo)))
     (home-page "https://github.com/theislab/scanpy")
     (synopsis "Single-Cell Analysis in Python.")
     (description "Scanpy is a scalable toolkit for analyzing single-cell gene
-- 
2.31.1