[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: Add python-jupyter-console as input to python-ipython.
From: |
Christopher Baines |
Subject: |
01/01: gnu: Add python-jupyter-console as input to python-ipython. |
Date: |
Thu, 12 Oct 2017 15:24:04 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository guix.
commit ee8aab1f8db79e73612530a9fa4c32f252099e3e
Author: Christopher Baines <address@hidden>
Date: Tue Oct 10 23:31:57 2017 +0100
gnu: Add python-jupyter-console as input to python-ipython.
This fixes running ipython console and ipython3 console, as the
jupyter_console package is missing.
As python-ipython is an input to python-jupyter-console, use a modified
version of the package which doesn't have this input.
* gnu/packages/python.scm (python-jupyter-console-minimal): New variable.
(python-ipython)[propagated-inputs]: Replace python-jupyter-console with
python-jupyter-console-minimal.
---
gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 1509f70..f436023 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -5855,6 +5855,12 @@ 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.
+ ,python-jupyter-console-minimal)
("python-mistune" ,python-mistune)
("python-pexpect" ,python-pexpect)
("python-pickleshare" ,python-pickleshare)
@@ -8560,6 +8566,31 @@ Jupyter kernels such as IJulia and IRKernel.")
(define-public python2-jupyter-console
(package-with-python2 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.
+(define python-jupyter-console-minimal
+ (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
+ (alist-delete
+ "python-ipython"
+ (package-propagated-inputs python-jupyter-console)))))
+
(define-public jupyter
(package
(name "jupyter")