lang/python: fix pipenv support for +python/repl
This commit is contained in:
parent
4a9a2c00d9
commit
da55ee2af2
1 changed files with 10 additions and 7 deletions
|
@ -7,13 +7,16 @@
|
||||||
(defun +python/repl ()
|
(defun +python/repl ()
|
||||||
"Open the Python REPL."
|
"Open the Python REPL."
|
||||||
(interactive)
|
(interactive)
|
||||||
(process-buffer
|
(pop-to-buffer
|
||||||
(if-let* ((bin (executable-find "pipenv"))
|
(process-buffer
|
||||||
(dir (pipenv-project-p)))
|
(let ((interp python-shell-interpreter)
|
||||||
(let* ((default-directory dir)
|
(interp-args python-shell-interpreter-args))
|
||||||
(python-shell-interpreter (format "%s run %s" bin python-shell-interpreter)))
|
(if-let* ((bin (executable-find "pipenv"))
|
||||||
(run-python nil t t))
|
(default-directory (pipenv-project-p))
|
||||||
(run-python nil t t))))
|
(python-shell-interpreter "pipenv")
|
||||||
|
(python-shell-interpreter-args (format "run %s %s" interp interp-args)))
|
||||||
|
(run-python nil t t)
|
||||||
|
(run-python nil t t))))))
|
||||||
|
|
||||||
(defun +python--extract-version (prefix str)
|
(defun +python--extract-version (prefix str)
|
||||||
(when str
|
(when str
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue