diff options
author | Ludovic Courtès <ludo@gnu.org> | 2019-07-16 23:25:18 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2019-07-17 15:36:04 +0200 |
commit | aa856d02b8018eab059d5a337f613692ac5d93fc (patch) | |
tree | 5666468869e1c5acadf55365d29f6b0ca7eaa38e /gnu/packages/python-xyz.scm | |
parent | dcc773e56049eb64efc61961cddb4fdba0d7a582 (diff) | |
download | guix-aa856d02b8018eab059d5a337f613692ac5d93fc.tar.gz |
gnu: python-ipykernel: Record absolute file name of 'python'.
* gnu/packages/python-xyz.scm (python-ipykernel)[arguments]: Add 'set-python-file-name' phase.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 5a89243dbc..9de8203264 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -5157,7 +5157,17 @@ installing @code{kernelspec}s for use with Jupyter frontends.") (lambda _ (setenv "HOME" "/tmp") (invoke "pytest" "-v") - #t))))) + #t)) + (add-after 'install 'set-python-file-name + (lambda* (#:key outputs #:allow-other-keys) + ;; Record the absolute file name of the 'python' executable in + ;; 'kernel.json'. + (let ((out (assoc-ref outputs "out"))) + (substitute* (string-append out "/share/jupyter" + "/kernels/python3/kernel.json") + (("\"python\"") + (string-append "\"" (which "python") "\""))) + #t)))))) (propagated-inputs `(("python-ipython" ,python-ipython) ;; imported at runtime during connect |