all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#28782] [PATCH] gnu: Add python-jupyter-console as input to python-ipython.
@ 2017-10-11  9:06 Christopher Baines
  2017-10-11 19:56 ` Ludovic Courtès
  0 siblings, 1 reply; 3+ messages in thread
From: Christopher Baines @ 2017-10-11  9:06 UTC (permalink / raw)
  To: 28782

This fixes running ipython console and ipython3 console.

As python-ipython is an input to python-jupyter-console, depend on a modified
version of the package which doesn't have this input.

* gnu/packages/python.scm (python-ipython)[propagated-inputs]: Add a modified
  version of python-jupyter-console.
---
 gnu/packages/python.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 8521ab352..6921a8944 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5851,6 +5851,31 @@ tools for mocking system commands and recording calls to those.")
        ("python-numpy" ,python-numpy)
        ("python-numpydoc" ,python-numpydoc)
        ("python-jinja2" ,python-jinja2)
+       ("python-jupyter-console"
+        ;; The python-ipython and python-jupyter-console require each
+        ;; other. To get the functionality in both packages working, strip
+        ;; down the python-jupyter-console package when using it as an input
+        ;; to python-ipython.
+        ,(package
+           (inherit python-jupyter-console)
+           (arguments
+            (substitute-keyword-arguments
+                (package-arguments python-jupyter-console)
+              ((#:phases phases)
+               `(modify-phases ,phases
+                  (add-after 'install 'delete-bin
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      ;; Delete the bin files, to avoid conflicts in profiles
+                      ;; where python-ipython and python-jupyter-console are
+                      ;; both present.
+                      (delete-file-recursively
+                       (string-append
+                        (assoc-ref outputs "out") "/bin"))))))))
+           ;; Remove the python-ipython propagated input, to avoid the cycle
+           (propagated-inputs
+            (remove (lambda (input)
+                      (string=? (car input) name))
+                    (package-propagated-inputs python-jupyter-console)))))
        ("python-mistune" ,python-mistune)
        ("python-pexpect" ,python-pexpect)
        ("python-pickleshare" ,python-pickleshare)
-- 
2.14.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-10-12 19:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-11  9:06 [bug#28782] [PATCH] gnu: Add python-jupyter-console as input to python-ipython Christopher Baines
2017-10-11 19:56 ` Ludovic Courtès
2017-10-12 19:27   ` bug#28782: " Christopher Baines

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.