sharlatan pushed a commit to branch master
in repository guix.

commit 3d9279b00974969304cb243193a72ba8916e72d9
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Thu Apr 24 13:31:43 2025 +0100

    gnu: python-qtconsole: Move to jupyter.
    
    * gnu/packages/python-xyz.scm (python-qtconsole): Move from here ...
    * gnu/packages/jupyter.scm: ... to here. Add qt and xorg modules.
    * gnu/packages/orange.scm: Add jupyter module.
    
    Change-Id: I9145393c469050aca748543cac04c391dbab7c83
---
 gnu/packages/jupyter.scm    | 60 ++++++++++++++++++++++++++++++++++++++++++++-
 gnu/packages/orange.scm     |  1 +
 gnu/packages/python-xyz.scm | 56 ------------------------------------------
 3 files changed, 60 insertions(+), 57 deletions(-)

diff --git a/gnu/packages/jupyter.scm b/gnu/packages/jupyter.scm
index 778bb01bd8..925987bc26 100644
--- a/gnu/packages/jupyter.scm
+++ b/gnu/packages/jupyter.scm
@@ -45,13 +45,15 @@
   #:use-module (gnu packages python-science)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages python-web)
+  #:use-module (gnu packages qt)
   #:use-module (gnu packages rdf)
   #:use-module (gnu packages time)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages sphinx)
   #:use-module (gnu packages serialization)
-  #:use-module (gnu packages version-control))
+  #:use-module (gnu packages version-control)
+  #:use-module (gnu packages xorg))
 
 (define-public python-nbclassic
   (package
@@ -1184,6 +1186,62 @@ datasets across widgets.")
 analyzing Jupyter Notebooks.")
     (license license:bsd-3)))
 
+(define-public python-qtconsole
+  (package
+    (name "python-qtconsole")
+    (version "5.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "qtconsole" version))
+       (sha256
+        (base32 "1r8bznf8mlajh8rcrhikp694naq653nx4zw58f0yzlvmdiz1rbaw"))))
+    (build-system pyproject-build-system)
+    (arguments
+     (list
+      #:test-flags
+      ;; All tests fail with error: This plugin does not support
+      ;; propagateSizeHints()
+      #~(list "--ignore=qtconsole/tests/test_00_console_widget.py"
+              ;; AssertionError: '<!DO[261 chars]size:12pt; font-weight:400;
+              ;; font-style:normal;[1218 chars]tml>' != '<!DO[261
+              ;; chars]size:9pt; font-weight:400; font-style:normal;"[1217
+              ;; chars]tml>'Diff is 1756 characters long. Set self.maxDiff to
+              ;; None to see it.
+              "-k" "not test_other_output")
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-before 'check 'pre-check
+            (lambda _
+              (setenv "PYTEST_QT_API" "pyqt5")
+              (setenv "QT_LIB" "pyqt5")
+              (setenv "QT_QPA_PLATFORM" "offscreen")
+              (system "Xvfb :1 -screen 0 640x480x24 &")
+              (setenv "DISPLAY" ":1")
+              (setenv "HOME" "/tmp"))))))
+    (native-inputs
+     (list python-flaky
+           python-pyqt
+           python-pytest
+           python-pytest-qt
+           python-setuptools
+           python-wheel
+           xorg-server-for-tests))
+    (propagated-inputs
+     (list python-ipykernel
+           python-jupyter-client
+           python-jupyter-core
+           python-packaging
+           python-pygments
+           python-qtpy
+           python-traitlets))
+    (home-page "https://jupyter.org";)
+    (synopsis "Jupyter Qt console")
+    (description
+     "This package provides a Qt-based console for Jupyter with support for
+rich media output.")
+    (license license:bsd-3)))
+
 (define-public python-voila
   (package
     (name "python-voila")
diff --git a/gnu/packages/orange.scm b/gnu/packages/orange.scm
index 34fb616a51..28a066bbfb 100644
--- a/gnu/packages/orange.scm
+++ b/gnu/packages/orange.scm
@@ -29,6 +29,7 @@
   #:use-module (gnu packages check)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages graph)
+  #:use-module (gnu packages jupyter)
   #:use-module (gnu packages machine-learning)
   #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-check)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 4bf09ce635..6cb98356b1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19561,62 +19561,6 @@ Jupyter kernels such as IJulia and IRKernel.")
      (modify-inputs (package-propagated-inputs python-jupyter-console)
        (delete "python-ipython")))))
 
-(define-public python-qtconsole
-  (package
-    (name "python-qtconsole")
-    (version "5.6.1")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (pypi-uri "qtconsole" version))
-       (sha256
-        (base32 "1r8bznf8mlajh8rcrhikp694naq653nx4zw58f0yzlvmdiz1rbaw"))))
-    (build-system pyproject-build-system)
-    (arguments
-     (list
-      #:test-flags
-      ;; All tests fail with error: This plugin does not support
-      ;; propagateSizeHints()
-      #~(list "--ignore=qtconsole/tests/test_00_console_widget.py"
-              ;; AssertionError: '<!DO[261 chars]size:12pt; font-weight:400;
-              ;; font-style:normal;[1218 chars]tml>' != '<!DO[261
-              ;; chars]size:9pt; font-weight:400; font-style:normal;"[1217
-              ;; chars]tml>'Diff is 1756 characters long. Set self.maxDiff to
-              ;; None to see it.
-              "-k" "not test_other_output")
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-before 'check 'pre-check
-            (lambda _
-              (setenv "PYTEST_QT_API" "pyqt5")
-              (setenv "QT_LIB" "pyqt5")
-              (setenv "QT_QPA_PLATFORM" "offscreen")
-              (system "Xvfb :1 -screen 0 640x480x24 &")
-              (setenv "DISPLAY" ":1")
-              (setenv "HOME" "/tmp"))))))
-    (native-inputs
-     (list python-flaky
-           python-pyqt
-           python-pytest
-           python-pytest-qt
-           python-setuptools
-           python-wheel
-           xorg-server-for-tests))
-    (propagated-inputs
-     (list python-ipykernel
-           python-jupyter-client
-           python-jupyter-core
-           python-packaging
-           python-pygments
-           python-qtpy
-           python-traitlets))
-    (home-page "https://jupyter.org";)
-    (synopsis "Jupyter Qt console")
-    (description
-     "This package provides a Qt-based console for Jupyter with support for
-rich media output.")
-    (license license:bsd-3)))
-
 (define-public python-jsbeautifier
   (package
     (name "python-jsbeautifier")

Reply via email to