unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Lin Sun <sunlin7.mail@gmail.com>, 70815@debbugs.gnu.org
Cc: kobarity <kobarity@gmail.com>
Subject: bug#70815: [PATCH] ; Enahnce python-tests.el to adapt different python interpreters
Date: Sat, 18 May 2024 22:20:44 +0000	[thread overview]
Message-ID: <CADwFkm=H7x4miVaqgcis=saOsrErO9n1-X8NZeLFHxm3QpFnSQ@mail.gmail.com> (raw)
In-Reply-To: <CABCREdpJhB03tGiR6V1FYxOai0Zswnr3mAMOEPzJLDccWthTTA@mail.gmail.com>

Lin Sun <sunlin7.mail@gmail.com> writes:

> From 49dfcecbbffaf15aa0414d15f22d8bcbf768ebb3 Mon Sep 17 00:00:00 2001
> From: Lin Sun <sunlin7@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:
>  \f
>  ;;; 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?





  parent reply	other threads:[~2024-05-18 22:20 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-07  6:53 bug#70815: [PATCH] ; Enahnce python-tests.el to adapt different python interpreters Lin Sun
2024-05-11  9:05 ` Eli Zaretskii
2024-05-11 13:37   ` kobarity
2024-05-11 14:27     ` Lin Sun
2024-05-12  2:06       ` kobarity
2024-05-18 22:20 ` Stefan Kangas [this message]
2024-05-19  5:54   ` Eli Zaretskii
2024-05-20  0:08     ` Lin Sun
2024-05-20 15:52       ` kobarity
2024-05-20 17:51         ` Lin Sun
2024-05-21 14:04           ` kobarity
2024-05-21 15:34             ` Lin Sun
2024-05-22 14:38               ` kobarity
2024-05-23 13:09                 ` Eli Zaretskii
2024-05-26 10:52 ` Mattias Engdegård
2024-05-26 12:05   ` kobarity
2024-05-26 12:21     ` Mattias Engdegård
2024-05-26 12:36       ` kobarity
2024-05-26 13:23         ` Mattias Engdegård
2024-05-26 14:15           ` kobarity
2024-05-26 15:00             ` kobarity
2024-05-26 15:24               ` Mattias Engdegård
2024-05-27 12:33                 ` kobarity
2024-05-27 12:45                   ` Eli Zaretskii
2024-05-28 12:30                   ` Mattias Engdegård
2024-05-28 15:17                     ` kobarity
2024-05-28 16:09                       ` Mattias Engdegård
2024-05-29 14:56                         ` kobarity
2024-05-30 10:09                           ` Mattias Engdegård
2024-06-02 13:20                             ` kobarity
2024-06-03 14:02                               ` Mattias Engdegård
2024-06-03 14:34                                 ` kobarity
2024-06-03 16:24                                   ` kobarity
2024-06-04 14:29                                     ` kobarity
2024-06-05 10:25                                       ` Mattias Engdegård
2024-06-05 11:52                                         ` kobarity
2024-06-08 15:34                                           ` kobarity
2024-06-09 13:58                                             ` Mattias Engdegård
2024-06-10 14:57                                               ` kobarity
2024-06-10 15:44                                                 ` Mattias Engdegård
2024-05-26 15:56             ` Eli Zaretskii
2024-05-26 23:06               ` Stefan Kangas
2024-05-27 11:18                 ` Eli Zaretskii
2024-05-27 12:20                   ` Mattias Engdegård
2024-05-27 12:43                     ` Eli Zaretskii
2024-05-26 15:52           ` Eli Zaretskii
2024-05-27 10:24             ` Mattias Engdegård
2024-05-27 11:19               ` Lin Sun
2024-05-26 15:36   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkm=H7x4miVaqgcis=saOsrErO9n1-X8NZeLFHxm3QpFnSQ@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=70815@debbugs.gnu.org \
    --cc=kobarity@gmail.com \
    --cc=sunlin7.mail@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).