From nobody Mon Feb 9 15:46:08 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1684405072; cv=none; d=zohomail.com; s=zohoarc; b=Sop/iisDNPUHIkRJIWIGo2YgPYi3D1Qn47MoY8p8HMDGnaX6upRXuw88spajln12DAndmDZqPcqhXTV3JgyliCJi1pw2Ln0wRj1mK3Hg+oF13Ozxfwb5up3W+lybKbyuSiTqshFCjtsMSAORKIfm9ixGzO3CX7HBV9LlwchN6wo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1684405072; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5829EDh+A0fu/7ZyAyFNAEoxfs5mbFKrfAOVvNvxE6Y=; b=LPsyxrJcZnBDkJI9kuwRDcyDggESDQ1edMlXRn/RFx1HDhx5uX7QSz7x5qWTop82X3c059dRpi4j0/pv3pv6Sl8Ak4DlsKZL3nYG9LQJI6xL4tijWi89Fbr2wmkS68fVimWpJ7rIkTKKY0C8PWUcIC2STBMI4s4eVrUWMKb+cZw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1684405072160541.4684233026069; Thu, 18 May 2023 03:17:52 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzahC-0005zI-3a; Thu, 18 May 2023 06:17:18 -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 1pzah6-0005yU-CK for qemu-devel@nongnu.org; Thu, 18 May 2023 06:17:12 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzah4-0004Yz-9d for qemu-devel@nongnu.org; Thu, 18 May 2023 06:17:11 -0400 Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-158---VVBHqdNGeWGNZGpakZfQ-1; Thu, 18 May 2023 06:17:07 -0400 Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-510ecda1ecfso283408a12.2 for ; Thu, 18 May 2023 03:17:07 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.gmail.com with ESMTPSA id k3-20020aa7d8c3000000b0050d56dffc93sm402845eds.12.2023.05.18.03.17.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 May 2023 03:17:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1684405028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5829EDh+A0fu/7ZyAyFNAEoxfs5mbFKrfAOVvNvxE6Y=; b=QI4hLIw2P8S84aTOb4/ILLV2g1lQayq1y7U/uqI/DwbITlXPqMPyXuJl1l62tatPYUi3C1 N9yNa/B76nEmwlrNsffaE2ToS7mU9msau4fB/NQRMZxqPlbU2XdnTNIvWlPg3lw+8vDzwP Lt0vUbqjlPL47RYLzZiluq8hmiA1y+k= X-MC-Unique: --VVBHqdNGeWGNZGpakZfQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684405026; x=1686997026; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5829EDh+A0fu/7ZyAyFNAEoxfs5mbFKrfAOVvNvxE6Y=; b=CEzRtHTM/4ntglf/asRpyEBy/o6RzLaVl0frgh53zvSWz4LOhjzZ1AE/ra8NMk7K+Y vI09q/9d/7FjgUYhKW5PkOa7kLpwE4ruv6of89wseC7vUvBKkb4pU6Rn/xCVRLEWVfRm BzsXOCPK4eF/w9o6ajyOOSCh7rlKG1RflqO9Ns1sj+D2dPxUnSGT3cGeIlh0DJHdQpKD t7DbtVMMe6i2xG878bXWifkopRdocbILfVswTI2svRPjUuS9P2zKB4mMsnSrQAUfgwhs w3JQ8yPY0CurUOVLw+DoBlUSGbVuhllntgT3oLEYD77Zw0W8FBH/OwVG9RWg/iiuZjco Z0Gw== X-Gm-Message-State: AC+VfDyITg30iUMYuX4s5apTHmMDpr5eKE+J/7glR1A1FzbNNNlC0fkz bNwzvO4rGLUebfAseFYsFrGK7zHydGaQl4Ehy3oleyls2Mnok9OvinPTWa8YtuvyzfnQcPs2fuT a5LuejvT71VoeMlHn6iPb9AeTTzbdsixxdqDbmISiqKTGQXOhcEwY/+stOeUq9m1I89FxPrdtsc k= X-Received: by 2002:aa7:d9cf:0:b0:50c:7fb:93cf with SMTP id v15-20020aa7d9cf000000b0050c07fb93cfmr4260408eds.12.1684405025667; Thu, 18 May 2023 03:17:05 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4DDh/mOOY71t5dOoMW8WROcap4R46Gik5N+TSX/nt/wJClkS9kd8pDxXFjLrPAmPF5dUDkSQ== X-Received: by 2002:aa7:d9cf:0:b0:50c:7fb:93cf with SMTP id v15-20020aa7d9cf000000b0050c07fb93cfmr4260394eds.12.1684405025284; Thu, 18 May 2023 03:17:05 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: John Snow Subject: [PULL v2 39/59] configure: bootstrap sphinx with mkvenv Date: Thu, 18 May 2023 12:17:02 +0200 Message-Id: <20230518101702.991996-2-pbonzini@redhat.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230518101702.991996-1-pbonzini@redhat.com> References: <20230518101702.991996-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1684405073221100001 Content-Type: text/plain; charset="utf-8" From: John Snow When docs are explicitly requested, require Sphinx>=3D1.6.0. When docs are explicitly disabled, don't bother to check for Sphinx at all. If docs are set to "auto", attempt to locate Sphinx, but continue onward if it wasn't located. Signed-off-by: Paolo Bonzini Signed-off-by: John Snow Message-Id: <20230511035435.734312-22-jsnow@redhat.com> Signed-off-by: Paolo Bonzini --- configure | 21 +++++++++++++++++++-- docs/conf.py | 9 --------- docs/meson.build | 2 +- meson_options.txt | 2 -- scripts/meson-buildoptions.sh | 3 --- 5 files changed, 20 insertions(+), 17 deletions(-) diff --git a/configure b/configure index f8308926bbc6..e0832f13ff49 100755 --- a/configure +++ b/configure @@ -1115,9 +1115,9 @@ fi =20 # Suppress writing compiled files python=3D"$python -B" +mkvenv=3D"$python ${source_path}/python/scripts/mkvenv.py" =20 - -if ! $python "${source_path}/python/scripts/mkvenv.py" ensure \ +if ! $mkvenv ensure \ --dir "${source_path}/python/wheels" \ --diagnose "meson" \ "meson>=3D0.61.5" ; @@ -1132,6 +1132,23 @@ fi =20 meson=3D"$(cd pyvenv/bin; pwd)/meson" =20 +# Conditionally ensure Sphinx is installed. + +if test "$docs" !=3D "disabled" ; then + if ! $mkvenv ensure \ + --diagnose "sphinx-build" \ + "sphinx>=3D1.6.0" "sphinx-rtd-theme>=3D0.5.0"; + then + if test "$docs" =3D "enabled" ; then + exit 1 + fi + echo "Sphinx not found/usable, disabling docs." + docs=3Ddisabled + else + docs=3Denabled + fi +fi + # Probe for ninja =20 if test -z "$ninja"; then diff --git a/docs/conf.py b/docs/conf.py index 00767b0e24fb..c687ff266301 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -32,15 +32,6 @@ from distutils.version import LooseVersion from sphinx.errors import ConfigError =20 -# Make Sphinx fail cleanly if using an old Python, rather than obscurely -# failing because some code in one of our extensions doesn't work there. -# In newer versions of Sphinx this will display nicely; in older versions -# Sphinx will also produce a Python backtrace but at least the information -# gets printed... -if sys.version_info < (3,6): - raise ConfigError( - "QEMU requires a Sphinx that uses Python 3.6 or better\n") - # The per-manual conf.py will set qemu_docdir for a single-manual build; # otherwise set it here if this is an entire-manual-set build. # This is always the absolute path of the docs/ directory in the source tr= ee. diff --git a/docs/meson.build b/docs/meson.build index 6d0986579e17..9040f860ae1a 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -1,4 +1,4 @@ -sphinx_build =3D find_program(get_option('sphinx_build'), +sphinx_build =3D find_program(fs.parent(python.full_path()) / 'sphinx-buil= d', required: get_option('docs')) =20 # Check if tools are available to build documentation. diff --git a/meson_options.txt b/meson_options.txt index 11aec2a441a4..f27aa43de1d9 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,8 +12,6 @@ option('pkgversion', type : 'string', value : '', description: 'use specified string as sub-version of the package') option('smbd', type : 'string', value : '', description: 'Path to smbd for slirp networking') -option('sphinx_build', type : 'string', value : 'sphinx-build', - description: 'Use specified sphinx-build for building document') option('iasl', type : 'string', value : '', description: 'Path to ACPI disassembler') option('tls_priority', type : 'string', value : 'NORMAL', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 52fb079a6005..f86f75fa0b5f 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -57,8 +57,6 @@ meson_options_help() { printf "%s\n" ' --localedir=3DVALUE Locale data directory [share= /locale]' printf "%s\n" ' --localstatedir=3DVALUE Localstate data directory [/= var/local]' printf "%s\n" ' --mandir=3DVALUE Manual page directory [share= /man]' - printf "%s\n" ' --sphinx-build=3DVALUE Use specified sphinx-build f= or building document' - printf "%s\n" ' [sphinx-build]' printf "%s\n" ' --sysconfdir=3DVALUE Sysconf data directory [etc]' printf "%s\n" ' --tls-priority=3DVALUE Default TLS protocol/cipher = priority string' printf "%s\n" ' [NORMAL]' @@ -427,7 +425,6 @@ _meson_option_parse() { --disable-sndio) printf "%s" -Dsndio=3Ddisabled ;; --enable-sparse) printf "%s" -Dsparse=3Denabled ;; --disable-sparse) printf "%s" -Dsparse=3Ddisabled ;; - --sphinx-build=3D*) quote_sh "-Dsphinx_build=3D$2" ;; --enable-spice) printf "%s" -Dspice=3Denabled ;; --disable-spice) printf "%s" -Dspice=3Ddisabled ;; --enable-spice-protocol) printf "%s" -Dspice_protocol=3Denabled ;; --=20 2.40.1