summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-03-31 14:35:41 +0200
committerRicardo Wurmus <rekado@elephly.net>2022-03-31 14:37:58 +0200
commita69a44bf598301cee2b74c46a49301efc0b3be3f (patch)
tree8cb692983f84bf77e51aaf89e17a9e1f95153f71 /gnu
parent38b2026515a56761b7644d5463b5a3f0c76e175d (diff)
downloadguix-a69a44bf598301cee2b74c46a49301efc0b3be3f.tar.gz
gnu: python-loompy: Update to 3.0.7.
* gnu/packages/bioinformatics.scm (python-loompy): Update to 3.0.7.
[arguments]: Add build phases 'fix-h5py-error and 'set-numba-cache-dir;
respect TESTS? argument in 'check phase.
[propagated-inputs]: Add python-click, python-numba, and
python-numpy-groupies.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/bioinformatics.scm27
1 files changed, 22 insertions, 5 deletions
diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 4e1028b3ce..693158798a 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -10266,7 +10266,7 @@ variational inference.")
 (define-public python-loompy
   (package
     (name "python-loompy")
-    (version "2.0.17")
+    (version "3.0.7")
     ;; The tarball on Pypi does not include the tests.
     (source (origin
               (method git-fetch)
@@ -10276,16 +10276,33 @@ variational inference.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "12a5kjgiikapv93wahfw0frszx1lblnppyz3vs5gy8fgmgngra07"))))
+                "0xmw2yv1y3y7vh5jcbrmlkn43nmfs0pf6z78k1yxqs3qy248m9b0"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
-         (replace 'check
+         ;; See https://github.com/linnarsson-lab/loompy/issues/169
+         (add-after 'unpack 'fix-h5py-error
+           (lambda _
+             (substitute* "tests/test_file_attribute_manager.py"
+               (("h5py.File\\(f.name\\)")
+                "h5py.File(f.name, 'a')"))))
+         ;; Numba needs a writable dir to cache functions.
+         (add-before 'check 'set-numba-cache-dir
            (lambda _
-             (invoke "pytest" "tests"))))))
+             (setenv "NUMBA_CACHE_DIR" "/tmp")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "tests")))))))
     (propagated-inputs
-     (list python-h5py python-numpy python-pandas python-scipy))
+     (list python-click
+           python-h5py
+           python-numba
+           python-numpy
+           python-numpy-groupies
+           python-pandas
+           python-scipy))
     (native-inputs
      (list python-pytest))
     (home-page "https://github.com/linnarsson-lab/loompy")