gnu: python-ipykernel: Record absolute file name of 'python'.

* gnu/packages/python-xyz.scm (python-ipykernel)[arguments]: Add
'set-python-file-name' phase.
master
Ludovic Courtès 2019-07-16 23:25:18 +02:00
parent dcc773e560
commit aa856d02b8
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 11 additions and 1 deletions

View File

@ -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