lang/python: default to python3

This commit is contained in:
Henrik Lissner 2019-07-22 00:38:33 +02:00
parent 13f7f70242
commit 13ac086606
No known key found for this signature in database
GPG Key ID: 5F6C0EA160557395

View File

@ -46,6 +46,12 @@ called.")
(when (featurep! +lsp)
(add-hook 'python-mode-local-vars-hook #'lsp!))
;; Default to Python 3. Prefer the versioned Python binaries since some
;; systems stupidly make the unversioned one point at Python 2.
(when (and (executable-find "python3")
(string= python-shell-interpreter "python"))
(setq python-shell-interpreter "python3"))
(add-hook 'python-mode-hook
(defun +python-use-correct-flycheck-executables-h ()
"Use the correct Python executables for Flycheck."