All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>,
	Qemu-block <qemu-block@nongnu.org>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Thomas Huth" <thuth@redhat.com>,
	"Daniel Berrange" <berrange@redhat.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
	"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
	"Beraldo Leal" <bleal@redhat.com>
Subject: Re: [RFC PATCH 9/9] iotests: use tests/venv for running tests
Date: Sat, 14 May 2022 11:55:49 -0400	[thread overview]
Message-ID: <CAFn=p-bqbcXBLLmT3Fqu1b7Y0Hu=M6B5oKT7J9idXn=tmrt4UA@mail.gmail.com> (raw)
In-Reply-To: <b30dd93b-0ced-0aea-5e84-57fa4294f4ad@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]

On Fri, May 13, 2022, 11:33 AM Paolo Bonzini <pbonzini@redhat.com> wrote:

> On 5/13/22 16:38, John Snow wrote:
> > It *should*, because "#!/usr/bin/env python3" is the preferred shebang
> > for Python scripts.
> >
> > https://peps.python.org/pep-0394/ <https://peps.python.org/pep-0394/>
> >
> > 'python3' "should" be available. 'python' may not be.
> >
> > Probably the "python" name in Makefile for TESTS_PYTHON should actually
> > be "python3" as well. In practice, all permutations (python, python3,
> > python3.9, etc.) are symlinks* to the binary used to create the venv.
> > Which links are present may be site configurable, but pep394 should
> > guarantee that python3 is always available.
>
> IIRC we have some cases (FreeBSD?) where only the python3.x executable
> is available.  This is why we 1) default to Meson's Python 3 if neither
> --meson nor --python are passed, and 2) use the shebang you mention but
> with *non-executable* files, which Meson treats magically as "invoke
> with the Python interpreter that was used to launch me".
>
> Paolo
>

pkg install python3 on fbsd 13.0-R gives you /usr/bin/python3 fwiw. do you
know in what circumstances you get only a point release binary?

Creating a venv on fbsd with "python3 -m venv testvenv" created a python3
binary link, but not a python3.8 link, also.

Still leaning towards the idea that "python3" is safest, but maybe it
depends on how you install from ports etc. I'd still say that it's
reasonable to expect that a system with python pays heed to PEP0394, I
think you've got a broken python install if you don't.

(But, what's the use case that forced your hand otherwise?)

--js

>

[-- Attachment #2: Type: text/html, Size: 2748 bytes --]

  parent reply	other threads:[~2022-05-14 15:57 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-13  0:06 [RFC PATCH 0/9] tests: run python tests under the build/tests/venv environment John Snow
2022-05-13  0:06 ` [RFC PATCH 1/9] python: update for mypy 0.950 John Snow
2022-05-13  8:42   ` Paolo Bonzini
2022-05-13 14:09     ` John Snow
2022-05-13  0:06 ` [RFC PATCH 2/9] tests: add "TESTS_PYTHON" variable to Makefile John Snow
2022-05-13  8:23   ` Paolo Bonzini
2022-05-13  0:06 ` [RFC PATCH 3/9] tests: install "qemu" namespace package into venv John Snow
2022-05-13  8:26   ` Paolo Bonzini
2022-05-13 14:01     ` John Snow
2022-05-13  0:06 ` [RFC PATCH 4/9] tests: silence pip upgrade warnings during venv creation John Snow
2022-05-13  8:27   ` Paolo Bonzini
2022-05-13 14:02     ` John Snow
2022-05-13  0:06 ` [RFC PATCH 5/9] tests: use tests/venv to run basevm.py-based scripts John Snow
2022-05-13  8:33   ` Paolo Bonzini
2022-05-13  0:06 ` [RFC PATCH 6/9] tests: add check-venv as a dependency of check and check-block John Snow
2022-05-13  8:41   ` Paolo Bonzini
2022-05-13 14:12     ` John Snow
2022-05-13 15:34       ` Paolo Bonzini
2022-05-13 16:08         ` John Snow
2022-05-13  0:06 ` [RFC PATCH 7/9] tests: add check-venv to build-tcg-disabled CI recipe John Snow
2022-05-13  8:41   ` Paolo Bonzini
2022-05-13  0:06 ` [RFC PATCH 8/9] iotests: fix source directory location John Snow
2022-05-13  8:35   ` Paolo Bonzini
2022-05-13  0:06 ` [RFC PATCH 9/9] iotests: use tests/venv for running tests John Snow
2022-05-13  8:38   ` Paolo Bonzini
2022-05-13 14:38     ` John Snow
2022-05-13 15:33       ` Paolo Bonzini
2022-05-13 16:00         ` John Snow
2022-05-14 15:55         ` John Snow [this message]
2022-05-16  7:41           ` Paolo Bonzini
2022-05-17 23:51             ` John Snow
2022-05-18 10:38               ` Paolo Bonzini
2022-05-13  8:35 ` [RFC PATCH 0/9] tests: run python tests under the build/tests/venv environment Daniel P. Berrangé
2022-05-13  9:45   ` Paolo Bonzini
2022-05-13 10:29   ` Daniel P. Berrangé
2022-05-13 15:55     ` John Snow
2022-05-13 16:07       ` Daniel P. Berrangé
2022-05-13 16:49         ` Paolo Bonzini
2022-05-13 19:09           ` John Snow
2022-05-13 12:57   ` Kevin Wolf
2022-05-13 15:25   ` John Snow
2022-05-13 10:20 ` Paolo Bonzini
2022-05-13 15:39   ` John Snow
2022-05-13 16:07     ` Paolo Bonzini

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

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

  git send-email \
    --in-reply-to='CAFn=p-bqbcXBLLmT3Fqu1b7Y0Hu=M6B5oKT7J9idXn=tmrt4UA@mail.gmail.com' \
    --to=jsnow@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=bleal@redhat.com \
    --cc=crosa@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=wainersm@redhat.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.