Merge pull request #2437 from danlamanna/add-python-doctor-checks

lang/python: add additional checks
This commit is contained in:
Henrik Lissner 2020-02-24 20:45:23 -05:00 committed by GitHub
commit d6c81b6877
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,7 +5,7 @@
"This module requires (:tools lsp)")
(if (not (executable-find "python"))
(warn! "Python isn't installed.")
(error! "Python isn't installed.")
(unless (featurep! +lsp)
(unless (zerop (shell-command "python -c 'import setuptools'"))
(warn! "setuptools wasn't detected, which anaconda-mode requires"))))
@ -20,6 +20,28 @@
(unless (executable-find "conda")
(warn! "Couldn't find conda in your PATH")))
(when (featurep! +cython)
(unless (executable-find "cython")
(warn! "Couldn't find cython. cython-mode will not work.")))
(when (featurep! +ipython)
(unless (executable-find "ipython")
(warn! "Couldn't find ipython in your PATH")))
(unless (executable-find "pytest")
(warn! "Couldn't find pytest. Running tests through pytest will not work."))
(unless (executable-find "nosetests")
(warn! "Couldn't find nosetests. Running tests through nose will not work."))
(unless (executable-find "pipenv")
(warn! "Couldn't find pipenv. pipenv support will not work."))
(unless (executable-find "isort")
(warn! "Couldn't find isort. Import sorting will not work."))
(when (featurep! :editor format)
(unless (executable-find "pyflakes")
(warn! "Couldn't find pyflakes. Import management will not work."))
(unless (executable-find "black")
(warn! "Couldn't find black. Code formatting will not work.")))