|
From: | Paolo Bonzini |
Subject: | Re: [qemu-web PATCH] add post about plans for Python venvs |
Date: | Wed, 22 Mar 2023 16:39:58 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 |
On 3/22/23 16:18, Peter Maydell wrote:
On Wed, 22 Mar 2023 at 15:15, Paolo Bonzini<pbonzini@redhat.com> wrote:+Some of these tools are run through the `python3` executable, while others +are invoked directly as `sphinx-build` or `meson`, and this can create +inconsistencies. For example, QEMU's `configure` script checks for a +minimum version of Python and rejects too-old interpreters. What would +happen if code run via Sphinx or Meson used a different version?...this is why configure also separately checks that when you run sphinx it is executing with a new enough Python version.
Point taken, though "new enough" is not "the same version" used by --python or $PYTHON. I will tweak the end of the introduction as follows:
====As a result, even if `configure` is told to use `/usr/bin/python3.8` for the build, QEMU's custom Sphinx extensions would still run under Python 3.6. configure does separately check that Sphinx is executing with a new enough Python version, but it would be nice if there were a more generic way to prepare a consistent Python environment.
This post will explain how QEMU 8.1 will ensure that a single interpreter is used for the whole of the build process. Getting there will require some familiarity with Python packaging, so let's start with virtual environments.
==== Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |