[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#28782] [PATCH] gnu: Add python-jupyter-console as input to python-i
From: |
Ludovic Courtès |
Subject: |
[bug#28782] [PATCH] gnu: Add python-jupyter-console as input to python-ipython. |
Date: |
Wed, 11 Oct 2017 21:56:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Hello,
Christopher Baines <address@hidden> skribis:
> 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.
[...]
> @@ -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)))))
For clarity, perhaps we should declare the above as
‘python-jupyter-console-minimal’ (also with a ‘name’ field)?
Also, the (remove …) expression at the end can be rewritten as:
(alist-delete name (package-propagated-inputs python-jupyter-console))
Otherwise LGTM, thanks!
Ludo’.