From a713ef10570ba133db8964b215d3dad007d14594 Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Thu, 10 Feb 2022 20:19:49 +0100 Subject: [PATCH v6 26/28] gnu: Add python-pyvistaqt. * gnu/packages/python-science.scm (python-pyvistaqt): New variable. --- gnu/packages/python-science.scm | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 07aea5f57a..6868b0479d 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -1564,3 +1564,44 @@ (define-public python-dipy Additionally, it contains specialized methods for computational anatomy including diffusion, perfusion and structural imaging.") (license license:bsd-3))) + +(define-public python-pyvistaqt + (package + (name "python-pyvistaqt") + (version "0.9.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pyvista/pyvistaqt") + (commit version))) + (sha256 + (base32 "0wp60z1sdcr82j90q5waii7z23r57pfwl1wr3lmxkpqjc7bz0gq4")))) + (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))) -- 2.36.1