qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Subject: [PULL 09/14] configure: switch to ensuregroup
Date: Mon, 28 Aug 2023 12:38:48 +0200	[thread overview]
Message-ID: <20230828103856.46031-10-pbonzini@redhat.com> (raw)
In-Reply-To: <20230828103856.46031-1-pbonzini@redhat.com>

Using the new ensuregroup command, the desired versions of meson and
sphinx can be placed in pythondeps.toml rather than configure.

The meson.install entry in pythondeps.toml matches the version that is
found in python/wheels.  This ensures that mkvenv.py uses the bundled
wheel even if PyPI is enabled; thus not introducing warnings or errors
from versions that are more recent than the one used in CI.

The sphinx entries match what is shipped in Fedora 38.  It's the
last release that has support for older versions of Python (sphinx 6.0
requires Python 3.8) and especially docutils (of which sphinx 6.0 requires
version 0.18).  This is important because Ubuntu 20.04 has docutils 0.14
and Debian 11 has docutils 0.16.

"mkvenv.py ensure" is only used to bootstrap tomli.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure       | 14 ++++----------
 pythondeps.toml |  8 ++++++++
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/configure b/configure
index 347153702c1..e4d42d640e4 100755
--- a/configure
+++ b/configure
@@ -1024,13 +1024,8 @@ if $python -c 'import sys; sys.exit(sys.version_info >= (3,11))'; then
     $mkvenv ensure --dir "${source_path}/python/wheels" \
         'tomli>=1.2.0' || exit 1
 fi
-if ! $mkvenv ensure \
-     --dir "${source_path}/python/wheels" \
-     --diagnose "meson" \
-     "meson>=0.63.0" ;
-then
-    exit 1
-fi
+$mkvenv ensuregroup --dir "${source_path}/python/wheels" \
+     ${source_path}/pythondeps.toml meson || exit 1
 
 # At this point, we expect Meson to be installed and available.
 # We expect mkvenv or pip to have created pyvenv/bin/meson for us.
@@ -1047,10 +1042,9 @@ if test "$download" = "enabled" -a "$docs" = "enabled" ; then
 fi
 
 if test "$docs" != "disabled" ; then
-    if ! $mkvenv ensure \
+    if ! $mkvenv ensuregroup \
          $mkvenv_flags \
-         --diagnose "sphinx-build" \
-         "sphinx>=1.6.0" "sphinx-rtd-theme>=0.5.0";
+         ${source_path}/pythondeps.toml docs;
     then
         if test "$docs" = "enabled" ; then
             exit 1
diff --git a/pythondeps.toml b/pythondeps.toml
index 362f63ff2c9..6be31dba301 100644
--- a/pythondeps.toml
+++ b/pythondeps.toml
@@ -15,3 +15,11 @@
 #           precise error diagnostics to the user.  For example,
 #           'sphinx-build' can be used as a bellwether for the
 #           presence of 'sphinx' in the system.
+
+[meson]
+# The install key should match the version in python/wheels/
+meson = { accepted = ">=0.63.0", installed = "0.63.3", canary = "meson" }
+
+[docs]
+sphinx = { accepted = ">=1.6", installed = "5.3.0", canary = "sphinx-build" }
+sphinx_rtd_theme = { accepted = ">=0.5", installed = "1.1.1" }
-- 
2.41.0



  parent reply	other threads:[~2023-08-28 10:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-28 10:38 [PULL 00/14] Python, i386 changes for 2023-08-28 Paolo Bonzini
2023-08-28 10:38 ` [PULL 01/14] configure: fix and complete detection of tricore tools Paolo Bonzini
2023-08-28 10:38 ` [PULL 02/14] dockerfiles: bump tricore cross compiler container to Debian 11 Paolo Bonzini
2023-08-28 10:38 ` [PULL 03/14] python: mkvenv: tweak the matching of --diagnose to depspecs Paolo Bonzini
2023-08-28 10:38 ` [PULL 04/14] python: mkvenv: introduce TOML-like representation of dependencies Paolo Bonzini
2023-08-28 10:38 ` [PULL 05/14] python: mkvenv: add ensuregroup command Paolo Bonzini
2023-08-28 10:38 ` [PULL 06/14] lcitool: bump libvirt-ci submodule and regenerate Paolo Bonzini
2023-08-28 10:38 ` [PULL 07/14] configure: never use PyPI for Meson Paolo Bonzini
2023-08-28 10:38 ` [PULL 08/14] python: use vendored tomli Paolo Bonzini
2023-08-28 10:38 ` Paolo Bonzini [this message]
2023-08-28 10:38 ` [PULL 10/14] Revert "tests: Use separate virtual environment for avocado" Paolo Bonzini
2023-08-28 10:38 ` [PULL 11/14] tests/docker: add python3-tomli dependency to containers Paolo Bonzini
2023-08-28 10:38 ` [PULL 12/14] target/i386: add support for VMX_SECONDARY_EXEC_ENABLE_USER_WAIT_PAUSE Paolo Bonzini
2023-08-28 10:38 ` [PULL 13/14] configure: fix container_hosts misspellings and duplications Paolo Bonzini
2023-08-28 10:38 ` [PULL 14/14] configure: remove unnecessary mkdir -p Paolo Bonzini
2023-08-28 21:14 ` [PULL 00/14] Python, i386 changes for 2023-08-28 Stefan Hajnoczi
2023-08-29 13:43 ` Stefan Hajnoczi

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=20230828103856.46031-10-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 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 NNTP newsgroup(s).