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 #20 received at 70815 <at> debbugs.gnu.org (full text, mbox):
Lin Sun <sunlin7.mail <at> gmail.com> writes:
> From 49dfcecbbffaf15aa0414d15f22d8bcbf768ebb3 Mon Sep 17 00:00:00 2001
> From: Lin Sun <sunlin7 <at> hotmail.com>
> Date: Fri, 3 May 2024 06:52:22 +0000
> Subject: [PATCH] ; Enahnce python-tests.el to adapt different python
> interpreters
>
> * test/lisp/progmodes/python-tests.el
> (python-tests-get-shell-interpreter): New function to get python
> interpreter for testing.
> ---
> test/lisp/progmodes/python-tests.el | 87 ++++++++++++++++-------------
> 1 file changed, 48 insertions(+), 39 deletions(-)
>
> diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el
> index f50797953c3..6da149925ec 100644
> --- a/test/lisp/progmodes/python-tests.el
> +++ b/test/lisp/progmodes/python-tests.el
> @@ -3718,7 +3718,16 @@ if x:
>
> ;;; Shell integration
>
> -(defvar python-tests-shell-interpreter "python")
> +(defvar python-tests-shell-interpreter nil)
> +
> +(defun python-tests-get-shell-interpreter (&optional refresh)
> + (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)))
> + (cl-some #'executable-find '("python" "python3" "python2"))))))
It makes sense to look for "python3", but is it really useful to look
for "python2" at this point?
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.