From patchwork Mon Jul 29 12:25:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 815017 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1241459wrd; Mon, 29 Jul 2024 05:26:09 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVA4vdC8p/pw6UU77ntA4wEB6FwgOTTRDtbKtEQm7KklPFElyi4hUj1Sd4GU0e6IDTbOoVklA5wKupdSwK+sn9+ X-Google-Smtp-Source: AGHT+IH1k2QZUFVSk4/5yjFcB3fzkiDFNeSHYmAsDnNK1Y6wXlxNOwPrAKkquGTlxJbt/hLOOFdI X-Received: by 2002:a05:620a:404b:b0:79d:6d7d:e5b3 with SMTP id af79cd13be357-7a1e5278d84mr1010387385a.42.1722255969599; Mon, 29 Jul 2024 05:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722255969; cv=none; d=google.com; s=arc-20160816; b=yPR7ZyMHD1xoDPLBGtfrppv57myDcQZJXF9kV+7jwQKo6atjrTDkmzdqZhSNBpuf1M mDr0n5KHGkqUayhXPw7+YRNT4sCzfGod/N2AyIA+6Lb+48xn7RvTN7uJGgshYhR5vYi7 gYqXpZ9CzRfxA8th2NchcqCaR7puUnHXrpQYtyOcGvVStAUQDQCOSrkZ4itA+YsyeMC+ HrkSdeZN2kpY4b+ddNLBzsWzicua4cUEtPcZSiNqokDROH3BqsfQT2HOeKD38XDp9xBy PfQKMohmn5aPTcdKOu+MMXv6WK8gWcYHUKpGc45wqejAFJ7pGYUPyBrJnQkuWziXc2Di KPrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=ZK5JAGCjpfD8w3xC2MXUI2a9OHNwAL8t7/Yak8e0bRA=; fh=OTkfrEnbNDInppsfj4HB8z6V33zCj7LOct256XBfW6M=; b=AezbX/83IN/S30+3GPefeNpHw5tB9QYACBM2H5NVt0+U9p7WqdHmzZWg0xkagR1kKT 6osFt+RM/Z5nxHFgJB/oiCY9B11vOTmttWlqHOPqzlKFZAaLRkvPJFzC4vxVRcXf73Be xsnfYKTXwOyl5EKmRYO17PX5L9Jv4YDKsN+M1kby+GKN9i8QqnrntG+6HNAptPPgf8+M INlWnKkVY0PhFDeb3VMO6OI3LIcd40F5UfzLLOF5wNTRZcEpb1Tuw0o42P9KBjlOJCYx qSVY2ZWH1SB0wnGU9NDbLGh6VI9jTUioq1M4ffJmiuHXfjcu0GqYjsFCSyxF00ntEOOM tfJQ==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OFsPWItw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id af79cd13be357-7a1d7445645si1021242185a.349.2024.07.29.05.26.09 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 05:26:09 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OFsPWItw; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sYPRx-0008Lk-0e; Mon, 29 Jul 2024 08:26:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sYPRu-0008Bk-FT for qemu-devel@nongnu.org; Mon, 29 Jul 2024 08:25:58 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYPRs-0000S2-AS for qemu-devel@nongnu.org; Mon, 29 Jul 2024 08:25:58 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42816ca782dso13961115e9.2 for ; Mon, 29 Jul 2024 05:25:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722255955; x=1722860755; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZK5JAGCjpfD8w3xC2MXUI2a9OHNwAL8t7/Yak8e0bRA=; b=OFsPWItwQoQtxzM+Zusj7LHMqmw7str7UJs5Ad5Svd6aWPzOcTp2fCX8QZBqEmH1SF 32asNGZtSA6Cmab8aCYl9dAbj64sgPtOo07pk2wZfbTKeU2/I1DZXuH+zhmFQcFWXH1G QQgbA3pppoOT/CvWI59GbXtVpGRcB9TpRGZ1GT3hOLQQnwcaNaboH09ItfnasoLeIfvA ZRAkwhTGGNQNOv2cdXTUPjHeGgAU2+TH3ZkN8uT8hAeMhRaMzuT7z7bzrCp6f54DSlA4 3EMVNQ4EIu5aFpsTM+Z9j1sSyHLdbaoam8y7oflBd0giqKCUfmJ9ZvUW8caV91L/RsDk gERA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722255955; x=1722860755; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZK5JAGCjpfD8w3xC2MXUI2a9OHNwAL8t7/Yak8e0bRA=; b=uOC9nq9xR7nTidPPpOl2jIG37y6BcQ5atfLDtiJMf/e2LLv1rUFQRXcMuC5xrI/TRm HRRLvbykTYvyV+SfLI/ztpLjjjcweKKMK3Tx32UdGqWzY6xEdHmyH8omyXV6Mjet1DBz eszda0WGZ5ZKk/DfKk8tLHb7G2zfOL5aZxH6JOITlkU/1DqgPSUCstn7zFAarBXn+KFE Ghg/KMgCGuvfsbJbFBKKQVOWbriueGDgTi6f/KSyp5FicInWmrmTmgEiWc1uBcuPnub7 xef87t2eJ1e2RlDhx9/SvwaMPZzHX6d2a4b60g0AVMF2wus4aEnVI31m4yCcc5liVvAN xp4g== X-Gm-Message-State: AOJu0Yzlz05HP1l1poNo8FqVi0MQUJ22lWw5DxnHhMJ9JixnvXtIpF2r t7DPB8qkettKwkO/kajbuFJo8D1InNAR2bSHekheB2GASnyu2A2LmhGAXEEWEHzf0j5sAqYMw+P 3 X-Received: by 2002:a05:600c:4511:b0:426:8884:3781 with SMTP id 5b1f17b1804b1-42811dd1089mr48447205e9.24.1722255954526; Mon, 29 Jul 2024 05:25:54 -0700 (PDT) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-428057b5f69sm177694415e9.39.2024.07.29.05.25.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jul 2024 05:25:54 -0700 (PDT) From: Peter Maydell To: qemu-devel@nongnu.org Cc: Paolo Bonzini Subject: [RFC] pythondeps: Split sphinx_rtd_theme into its own group Date: Mon, 29 Jul 2024 13:25:53 +0100 Message-Id: <20240729122553.2501133-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Currently we have "sphinx" and "sphinx_rtd_theme" in a single group in pythondeps.toml. This means that mkvenv will try to install them both at once, which doesn't work if sphinx_rtd_theme depends on a version of Sphinx which is newer than the system one, even if the "sphinx" we're installing at the same time would satisfy that dependency. For instance this: sphinx = { accepted = ">=8.0.0rc1", installed = "8.0.0rc1", canary = "sphinx-build" } sphinx_rtd_theme = { accepted = ">=2.1.0rc1", installed = "2.1.0rc1" } fails like this: mkvenv: Creating non-isolated virtual environment at 'pyvenv' mkvenv: checking for meson>=1.1.0 mkvenv: installing meson==1.2.3 mkvenv: checking for sphinx>=8.0.0rc1 mkvenv: checking for sphinx_rtd_theme>=2.1.0rc1 mkvenv: installing sphinx==8.0.0rc1, sphinx_rtd_theme==2.1.0rc1 ERROR: Cannot install sphinx-rtd-theme==2.1.0rc1 and sphinx==8.0.0rc1 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts *** Ouch! *** Could not provide build dependency 'sphinx==8.0.0rc1': • Python package 'sphinx' version '4.3.2' was found, but isn't suitable. • A suitable version could not be obtained from PyPI. (where 4.3.2 is the system version of sphinx on my system). Avoid this problem by splitting sphinx_rtd_theme into its own group in pythondeps, so we can install the new sphinx into the venv first and the sphinx_rtd_theme afterwards. Signed-off-by: Peter Maydell --- I'm just bumbling around in the dark here, hence the RFC tag: maybe there's a better way to fix this? I ran into this when I was trying to test the fix for https://gitlab.com/qemu-project/qemu/-/issues/2458 and wanted a newer Sphinx to test with. Unless you also install the newer RTD theme the new Sphinx will emit some deprecation warnings about things the theme is doing. --- configure | 7 +++++-- pythondeps.toml | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 019fcbd0ef7..7f9cfbffa2c 100755 --- a/configure +++ b/configure @@ -973,9 +973,12 @@ if test "$download" = "enabled" ; then fi if test "$docs" != "disabled" ; then - if ! $mkvenv ensuregroup \ + if ! ( $mkvenv ensuregroup \ $(test "$docs" = "enabled" && echo "$mkvenv_online_flag") \ - ${source_path}/pythondeps.toml docs; + ${source_path}/pythondeps.toml docs && \ + $mkvenv ensuregroup \ + $(test "$docs" = "enabled" && echo "$mkvenv_online_flag") \ + ${source_path}/pythondeps.toml docs-theme ); then if test "$docs" = "enabled" ; then exit 1 diff --git a/pythondeps.toml b/pythondeps.toml index f6e590fdd86..fdf5579c43e 100644 --- a/pythondeps.toml +++ b/pythondeps.toml @@ -24,6 +24,9 @@ meson = { accepted = ">=1.1.0", installed = "1.2.3", canary = "meson" } [docs] # Please keep the installed versions in sync with docs/requirements.txt sphinx = { accepted = ">=3.4.3", installed = "5.3.0", canary = "sphinx-build" } + +[docs-theme] +# Please keep the installed versions in sync with docs/requirements.txt sphinx_rtd_theme = { accepted = ">=0.5", installed = "1.1.1" } [avocado]