GNU bug report logs -
#70815
[PATCH] ; Enahnce python-tests.el to adapt different python interpreters
Previous Next
Reported by: Lin Sun <sunlin7.mail <at> gmail.com>
Date: Tue, 7 May 2024 06:54:02 UTC
Severity: normal
Tags: patch
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 70815 <at> debbugs.gnu.org (full text, mbox):
> From: Lin Sun <sunlin7.mail <at> gmail.com>
> Date: Tue, 7 May 2024 06:53:05 +0000
>
> The python-tests.el will fail on finding interpreter "python" for
> there is no "python" on CentOS8, Ubuntu 20.04, only "python3" exists
> after installation.
Thanks, I have some comments, and maybe kobarity will have as well.
> +(defun python-tests-get-shell-interpreter (&optional refresh)
AFAICT, this function is never called with the optional REFRESH
argument non-nil, so why do we need it?
> + (if (and python-tests-shell-interpreter (null refresh))
> + python-tests-shell-interpreter
> + (setq python-tests-shell-interpreter
> + (or (when-let* ((interpreter (getenv "EMACS_PYTHON_INTERPRETER")))
> + (or (executable-find interpreter)
> + (error "Not found EMACS_PYTHON_INTERPRETER: %s" interpreter)))
Is it indeed useful to error out here? Should we instead fall back to
the default list, '("python" "python3" "python2") ?
> + (cl-some #'executable-find '("python" "python3" "python2"))))))
cl-some is in cl-extra, so the test should require it.
This bug report was last modified 1 year and 40 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.