bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#70815: [PATCH] ; Enahnce python-tests.el to adapt different python i


From: Eli Zaretskii
Subject: bug#70815: [PATCH] ; Enahnce python-tests.el to adapt different python interpreters
Date: Sat, 11 May 2024 12:05:15 +0300

> From: Lin Sun <sunlin7.mail@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.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]