summary refs log tree commit diff
diff options
context:
space:
mode:
authorVivien Kraus <vivien@planete-kraus.eu>2022-02-10 20:19:49 +0100
committerTobias Geerinckx-Rice <me@tobias.gr>2022-02-13 01:00:04 +0100
commitf6ba339eb54e934eeabbc6789a6b2978ae74b626 (patch)
tree50f76e1004fb2c4bb1b3e7d54f58f329add80220
parent024f9d9f43b1a1f283f67dbfe88dc13ad7a41332 (diff)
downloadguix-f6ba339eb54e934eeabbc6789a6b2978ae74b626.tar.gz
gnu: Add python-pyvistaqt.
* gnu/packages/python-science.scm (python-pyvistaqt): New variable.
-rw-r--r--gnu/packages/python-science.scm41
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index ee77de4272..d04b0ef9e5 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -1389,3 +1389,44 @@ hardware resources.")
 Toolkit (VTK) that wraps the VTK library through NumPy and direct array access
 through a variety of methods and classes.")
     (license license:expat)))
+
+(define-public python-pyvistaqt
+  (package
+    (name "python-pyvistaqt")
+    (version "0.7.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/pyvista/pyvistaqt")
+             (commit version)))
+       (sha256
+        (base32 "19vm0kwxnn5dyiw1byi896spfzxaw39lk5bw7ff536qq1qqg3vnd"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'fix-skipping-tests
+           (lambda _
+             (substitute* "tests/conftest.py"
+               (("NO_PLOTTING, reason=") ""))))
+         (add-before 'check 'prepare-x
+           (lambda _
+             (system "Xvfb &")
+             (setenv "DISPLAY" ":0")
+             (setenv "HOME" "/tmp")))
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "python" "-m" "pytest")))))))
+    (propagated-inputs (list python-pyvista python-qtpy))
+    (native-inputs (list python-pytest python-codecov python-ipython
+                         python-numpy python-pytest-cov python-pytest-memprof
+                         python-pytest-qt python-pyvista python-qtpy
+                         python-scooby vtk xorg-server-for-tests))
+    (home-page "https://github.com/pyvista/pyvistaqt")
+    (synopsis "@code{pyvista} qt plotter")
+    (description "@code{pyvistaqt} is a helper module for pyvista to enable
+you to plot using pyqt by placing a vtk-widget into a background render.  This
+can be quite useful when you desire to update your plot in real-time.")
+    (license license:expat)))