Add "python3" to possible names for the python binary

Followed lang/python/config.el which already checks for python3
when setting the python-shell-interpreter.

Python version naming is a hot mess:
https://www.python.org/dev/peps/pep-0394/
This commit is contained in:
icmor 2020-12-12 00:55:43 -05:00
parent 1fba2ea303
commit 7053bfbeb7

View file

@ -4,10 +4,12 @@
(featurep! :tools lsp))
"This module requires (:tools lsp)")
(if (not (executable-find "python"))
(if (not (or (executable-find "python")
(executable-find "python3")))
(error! "Couldn't find python in your PATH")
(unless (featurep! +lsp)
(unless (zerop (shell-command "python -c 'import setuptools'"))
(unless (or (zerop (shell-command "python -c 'import setuptools'"))
(zerop (shell-command "python3 -c 'import setuptools'")))
(warn! "setuptools wasn't detected, which anaconda-mode requires"))))
(when (featurep! +pyenv)