|
|
|
@ -459,9 +459,9 @@ put executables in elpy-rpc-venv in path |
|
|
|
(setq-local pyvenv-workon (emacs-default-venv))) |
|
|
|
((let ((buffer-file-name (file-truename buffer-file-name))) |
|
|
|
;; Don't change anything if entering a file in a python install's lib (ie for a file located with xref) |
|
|
|
(if (string-match-p (rx bos (or |
|
|
|
(string-match-p (rx bos (or |
|
|
|
;; Windows |
|
|
|
(and letter "/" (one-or-more not-newline) |
|
|
|
(and letter ":/" (one-or-more not-newline) |
|
|
|
"/Lib") |
|
|
|
;; Rest of the sane world |
|
|
|
(and (or |
|
|
|
@ -488,9 +488,8 @@ put executables in elpy-rpc-venv in path |
|
|
|
(and "/lib/python" (one-or-more (any digit "."))) |
|
|
|
;; PyPy |
|
|
|
(and (or "/lib-python" "/lib_pypy"))))) |
|
|
|
(zero-or-more not-newline) |
|
|
|
"/" eos) |
|
|
|
buffer-file-name))) |
|
|
|
(zero-or-more not-newline)) |
|
|
|
buffer-file-name)) |
|
|
|
nil) |
|
|
|
(t |
|
|
|
;; Upon failing all conditions, prompt to create virtual environment if it doesn't exist |
|
|
|
|