guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

28/32: gnu: Add python-pyvista.


From: guix-commits
Subject: 28/32: gnu: Add python-pyvista.
Date: Wed, 16 Feb 2022 11:39:42 -0500 (EST)

nckx pushed a commit to branch wip-python-mne
in repository guix.

commit ca6d2cf25233ec09a7190455778758ad254a34b5
Author: Vivien Kraus <vivien@planete-kraus.eu>
AuthorDate: Mon Feb 7 00:17:17 2022 +0100

    gnu: Add python-pyvista.
    
    * gnu/packages/python-science.scm (python-pyvista): New variable.
---
 gnu/packages/python-science.scm | 56 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 3ada23bb57..ee77de4272 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1333,3 +1333,59 @@ including diffusion, perfusion and structural imaging.")
      "This package reports your python environment’s package versions and
 hardware resources.")
     (license license:expat)))
+
+(define-public python-pyvista
+  (package
+    (name "python-pyvista")
+    (version "0.33.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pyvista/pyvista";)
+             (commit (string-append "v" version))))
+       (sha256
+        (base32 "1kvv996jm56a169gjvhqym1zxpk75hxm6mrx85jb783qi0g627ar"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'prepare-x
+           (lambda _
+             (system "Xvfb &")
+             (setenv "DISPLAY" ":0")
+             (setenv "HOME" "/tmp")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; We don’t have either trimesh nor pythreejs
+               (substitute* "tests/test_helpers.py"
+                 (("import trimesh") ""))
+               (delete-file "tests/jupyter/test_pythreejs.py")
+               ;; This test downloads data
+               (delete-file "tests/utilities/test_reader.py")
+               (invoke "python" "-m" "pytest" "--pyargs" "-k"
+                       ;; test_ensight_multi_block_io downloads data,
+                       ;; test_load_theme requires ipyvtklink, and
+                       ;; test_tinypages fails to run sphinx
+                       "not test_ensight_multi_block_io \
+                        and not test_wrap_trimesh \
+                        and not test_load_theme \
+                        and not test_tinypages")))))))
+    (propagated-inputs
+     (list python-appdirs
+           python-imageio
+           python-numpy
+           python-pillow
+           python-scooby
+           vtk))
+    (native-inputs
+     (list python-pytest python-matplotlib python-hypothesis
+           python-ipython python-meshio python-tqdm python-sphinx
+           xorg-server-for-tests))
+    (home-page "https://github.com/pyvista/pyvista";)
+    (synopsis "Higher-level interface to VTK")
+    (description "PyVista is a helper module for the Visualization
+Toolkit (VTK) that wraps the VTK library through NumPy and direct array access
+through a variety of methods and classes.")
+    (license license:expat)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]