From nobody Mon May 13 23:05:03 2024 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=1676942801; cv=none; d=zohomail.com; s=zohoarc; b=YQ0S/Hwo5Z3nxyXW+1EGUEct717plmtMFeXHqHFZGZZf+QHsTh8jzVJ3WYlTbkJ0LYngfaPH0LkzivKhG2G+2Ejad0q6HNLOc/KwUKVximzKisPhIwrsbcXh4ePcarktgJEw9s7zoZh5AAWT8jy7aaR93HkpVu+BZUkduvAPHCc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676942801; h=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=fk2Gn893/WwFt0DvSYHSimxhp15ctLipFqOUK1WDtTY=; b=SMqGxsK1S9Lv2tiK2rMQUwN1wyI5dK/fJKVcQCULUewUS0my2gaTX/TFJwJJyvpqv9vPaS7RUrZH+7asFdR/7NjFm58G/gzn9muRUVkc5wjBXAGIfly0BMAZcjfx6LmGFfYJ4eUes0ytHRFKur750NpD4zh4qnPCAA97PbXR/P0= 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 1676942801522707.4943460480243; Mon, 20 Feb 2023 17:26:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUHP1-00038P-K6; Mon, 20 Feb 2023 20:25:07 -0500 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 1pUHOz-00035y-PD for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUHOw-0005yx-Md for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:05 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-77-N8JQ5JfHMcmgsAylqCTWfg-1; Mon, 20 Feb 2023 20:24:58 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A92D9800B23; Tue, 21 Feb 2023 01:24:57 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.32.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2138C2166B26; Tue, 21 Feb 2023 01:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676942701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fk2Gn893/WwFt0DvSYHSimxhp15ctLipFqOUK1WDtTY=; b=WnW/ATRQHRN0WbtXhlJw67147N2EcAPqQn+Tu1H7GeZY83B3bzJbCg6fwdIhcpXmYrXc/T DplYO5LxUW4QD6Ns3vgCNX27/7kAgo0ABFkeIQnQUFpgUf7xaYYglbtbq7nfQxPaaK1Q1o a/2azlwlFj8hUKuxav49s/mYaz3ObiY= X-MC-Unique: N8JQ5JfHMcmgsAylqCTWfg-1 From: John Snow To: qemu-devel@nongnu.org Cc: Michael Roth , Thomas Huth , qemu-block@nongnu.org, Cleber Rosa , Markus Armbruster , Paolo Bonzini , John Snow , Wainer dos Santos Moschetta , Peter Maydell , Beraldo Leal , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Hanna Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Berrange Subject: [PATCH v3 1/6] configure: Look for auxiliary Python installations Date: Mon, 20 Feb 2023 20:24:51 -0500 Message-Id: <20230221012456.2607692-2-jsnow@redhat.com> In-Reply-To: <20230221012456.2607692-1-jsnow@redhat.com> References: <20230221012456.2607692-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.129.124; envelope-from=jsnow@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 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: 1676942803579100003 Content-Type: text/plain; charset="utf-8" At the moment, we look for just "python3" and "python", which is good enough almost all of the time. But ... if you are on a platform that uses an older Python by default and only offers a newer Python as an option, you'll have to specify --python=3D/usr/bin/foo every time. As a courtesy, we can make a cursory attempt to locate a suitable Python binary ourselves, looking for the remaining well-known binaries. This also has the added benefit of making configure "just work" more often on various BSD distributions that do not have the concept of a "platform default python". This configure loop will prefer, in order: 1. Whatever is specified in $PYTHON 2. python3 3. python (Which is usually 2.x, but might be 3.x on some platforms.) 4. python3.11 down through python3.6 Notes: - Python virtual environments provide binaries for "python3", "python", and whichever version you used to create the venv, e.g. "python3.8". If configure is invoked from inside of a venv, this configure loop will not "break out" of that venv unless that venv is created using an explicitly non-suitable version of Python that we cannot use. - In the event that no suitable python is found, the first python found is the version used to generate the human-readable error message. - The error message isn't printed right away to allow later configuration code to pick up an explicitly configured python. Signed-off-by: John Snow --- configure | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/configure b/configure index cf6db3d5518..6abf5a72078 100755 --- a/configure +++ b/configure @@ -592,20 +592,40 @@ esac =20 : ${make=3D${MAKE-make}} =20 -# We prefer python 3.x. A bare 'python' is traditionally -# python 2.x, but some distros have it as python 3.x, so -# we check that too + +check_py_version() { + # We require python >=3D 3.6. + # NB: a True python conditional creates a non-zero return code (Failur= e) + "$1" -c 'import sys; sys.exit(sys.version_info < (3,6))' +} + python=3D +first_python=3D explicit_python=3Dno -for binary in "${PYTHON-python3}" python +# Check for $PYTHON, python3, python, then explicitly-versioned interprete= rs. +for binary in "${PYTHON-python3}" ${PYTHON:+python3} python \ + python3.11 python3.10 python3.9 \ + python3.8 python3.7 python3.6 do if has "$binary" then python=3D$(command -v "$binary") - break + if test -z "$first_python"; then + first_python=3D$python + fi + if check_py_version "$python"; then + # This one is good. + first_python=3D + break + fi fi done =20 +# If first_python is set, we didn't find a suitable binary. +# Use this one for possible future error messages. +if test -n "$first_python"; then + python=3D"$first_python" +fi =20 # Check for ancillary tools used in testing genisoimage=3D @@ -1037,9 +1057,7 @@ then error_exit "GNU make ($make) not found" fi =20 -# Note that if the Python conditional here evaluates True we will exit -# with status 1 which is a shell 'false' value. -if ! $python -c 'import sys; sys.exit(sys.version_info < (3,6))'; then +if ! check_py_version "$python"; then error_exit "Cannot use '$python', Python >=3D 3.6 is required." \ "Use --python=3D/path/to/python to specify a supported Python." fi --=20 2.39.0 From nobody Mon May 13 23:05:03 2024 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=1676942757; cv=none; d=zohomail.com; s=zohoarc; b=VpdDtZcU+BBBNnjouBGPLAM0bkFTJYJfwr5Hhsetb2TY6Nj45Gzt3r9bRZ4ow6hrE2497WylJTihhcBeQ9EwFC8U0FzMVEgeZ80cWvgFEMVt3qBU0MDICD6xcageW7LWSnRyojUfjUl4FgPVIFA30FqjedQ7uWS9jZQ2QmAEfic= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676942757; h=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=uJtO5Ea7PGqtKJhox1kr39alj61o8X+wdtLAaYtBVwg=; b=Weo0sYnBNzmB53O0KoTGH0XKAfEX2cFBbBUTa+4j1zDyockGcyV2XxLQkyvexQSbbOVbPvB8YU7Psx7W/SatzLtuf5ws0QOJg9vPul24CgiKy8PxjwYCj43qmmE1CADYV4/l1lp66+xuCuPbtfe2SuVskQDjydBj14IOIUQGOcA= 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 1676942757602362.1579207670068; Mon, 20 Feb 2023 17:25:57 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUHP9-0003AV-Iq; Mon, 20 Feb 2023 20:25:15 -0500 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 1pUHP6-00039v-Jr for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:12 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUHP4-0006BH-5z for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:12 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-9-EUGIAmWkOP-LUDNwfHV6dA-1; Mon, 20 Feb 2023 20:24:58 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4B677185A794; Tue, 21 Feb 2023 01:24:58 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.32.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id B5B842166B26; Tue, 21 Feb 2023 01:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676942709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=uJtO5Ea7PGqtKJhox1kr39alj61o8X+wdtLAaYtBVwg=; b=GQ+DQHf8BQtgVSwDny586WrNfYRx5gevlJVW3QhcSXh/qGmrOYY8VQ6/S0MAy8cqjG0+ar TSdi6NXzev3RRJ5SYteqFr3aN24/8Ph0tPUPobm8dIJBQzMp0rmTuOElH3iDC3sz/F306o SZHFCjuuuUpTa69mHcgL7yrHXdahdDY= X-MC-Unique: EUGIAmWkOP-LUDNwfHV6dA-1 From: John Snow To: qemu-devel@nongnu.org Cc: Michael Roth , Thomas Huth , qemu-block@nongnu.org, Cleber Rosa , Markus Armbruster , Paolo Bonzini , John Snow , Wainer dos Santos Moschetta , Peter Maydell , Beraldo Leal , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Hanna Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Berrange Subject: [PATCH v3 2/6] configure: Add courtesy hint to Python version failure message Date: Mon, 20 Feb 2023 20:24:52 -0500 Message-Id: <20230221012456.2607692-3-jsnow@redhat.com> In-Reply-To: <20230221012456.2607692-1-jsnow@redhat.com> References: <20230221012456.2607692-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.129.124; envelope-from=jsnow@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 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: 1676942759458100003 Content-Type: text/plain; charset="utf-8" If we begin requiring Python 3.7+, a few platforms are going to need to install an additional Python interpreter package. As a courtesy to the user, suggest the optional package they might need to install. This will hopefully minimize any downtime caused by the change in Python dependency. Signed-off-by: John Snow Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- configure | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 6abf5a72078..0d0cca53f09 100755 --- a/configure +++ b/configure @@ -1059,7 +1059,10 @@ fi =20 if ! check_py_version "$python"; then error_exit "Cannot use '$python', Python >=3D 3.6 is required." \ - "Use --python=3D/path/to/python to specify a supported Python." + "Use --python=3D/path/to/python to specify a supported Python= ." \ + "Maybe try:" \ + " openSUSE Leap 15.3+: zypper install python39" \ + " CentOS 8: dnf install python38" fi =20 # Suppress writing compiled files --=20 2.39.0 From nobody Mon May 13 23:05:03 2024 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=1676942784; cv=none; d=zohomail.com; s=zohoarc; b=OYpiXYVY4QYxjHQ8qFta4NGLGnixCFQZ5oQdXSRtE+VgvuZsm/ORyXXSJrCCtEl2RCDjHdp6RAX0p6pr1rzBtvJ63s409ywIn5ti5QVDpTAP93cDVfI28aVPaXDtTAMqumb19iXfoC5jW+zff2nIH3jxqBkAwyq9R/wawgrXiTQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676942784; h=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=upd0buijKZsbFsJ5yM4RHBoDxiaGKZqWE9t2zrq81DE=; b=VXAWIHd6HVJQKNVAgSKj1eTvz/WMCRFGo4VYIqEBf8V25O1EogVT9UrYPho2C8wsrSKyK1nadeoOauJwzyxDBqpPeawd98Q6VmY7ueg66/IXaD4mTs7WMKjU4Yfu5YrAo5gS6hvxtZ9AB8MHkMO7NEqan3dKzgW9FvPkrapXeTg= 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 1676942784006807.9267139073355; Mon, 20 Feb 2023 17:26:24 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUHP1-00038C-Kj; Mon, 20 Feb 2023 20:25:07 -0500 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 1pUHOz-00036L-V2 for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUHOx-00064A-Ub for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:05 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-249-f_wiba9-NkqFD6QoVk-xGQ-1; Mon, 20 Feb 2023 20:24:59 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E3E9180234E; Tue, 21 Feb 2023 01:24:58 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.32.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AF152166B26; Tue, 21 Feb 2023 01:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676942703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=upd0buijKZsbFsJ5yM4RHBoDxiaGKZqWE9t2zrq81DE=; b=a46S0fH6b340TRB9jPOORpQ/F+f/EPtCmVRB/ihyqeaTxSPKbqyGrEIPux/qVeTM/CUSTB sqMkbD74pBWkNK+r3Eb4zEsGPBvkGA4HLvjFW6kbugb4W7jM2kT9WzSW4X6Xs2v/ARJ0SI 0KQUjCNn4dy1qgi5eIk38J5DFKH4WIA= X-MC-Unique: f_wiba9-NkqFD6QoVk-xGQ-1 From: John Snow To: qemu-devel@nongnu.org Cc: Michael Roth , Thomas Huth , qemu-block@nongnu.org, Cleber Rosa , Markus Armbruster , Paolo Bonzini , John Snow , Wainer dos Santos Moschetta , Peter Maydell , Beraldo Leal , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Hanna Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Berrange Subject: [PATCH v3 3/6] DO-NOT-MERGE: testing: Add Python >= 3.7 to Centos, OpenSuSE Date: Mon, 20 Feb 2023 20:24:53 -0500 Message-Id: <20230221012456.2607692-4-jsnow@redhat.com> In-Reply-To: <20230221012456.2607692-1-jsnow@redhat.com> References: <20230221012456.2607692-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.129.124; envelope-from=jsnow@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 autolearn=unavailable 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: 1676942785511100003 Content-Type: text/plain; charset="utf-8" This is just a proof-of-concept patch, as these files are lcitool generated. The real fix will involve updating the lcitool configuration and updating these files that way. Paolo has been working on this part: https://lists.gnu.org/archive/html/qemu-devel/2023-01/msg03547.html This patch, meanwhile, is just to prove that bumping our dependency does not introduce any regressions in our test suite or developer processes. It also is meant to demonstrate the relatively small changes needed to begin utilizing 3.7 as a minimum. Signed-off-by: John Snow --- tests/docker/dockerfiles/centos8.docker | 1 + tests/docker/dockerfiles/opensuse-leap.docker | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerf= iles/centos8.docker index fbc953c6dcc..a3bfddf382d 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -95,6 +95,7 @@ RUN dnf distro-sync -y && \ pkgconfig \ pulseaudio-libs-devel \ python3 \ + python38 \ python3-PyYAML \ python3-numpy \ python3-pillow \ diff --git a/tests/docker/dockerfiles/opensuse-leap.docker b/tests/docker/d= ockerfiles/opensuse-leap.docker index 4b2c02d6abf..9e688c1d441 100644 --- a/tests/docker/dockerfiles/opensuse-leap.docker +++ b/tests/docker/dockerfiles/opensuse-leap.docker @@ -89,6 +89,7 @@ RUN zypper update -y && \ pam-devel \ pcre-devel-static \ pkgconfig \ + python39 \ python3-Pillow \ python3-PyYAML \ python3-Sphinx \ --=20 2.39.0 From nobody Mon May 13 23:05:03 2024 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=1676942766; cv=none; d=zohomail.com; s=zohoarc; b=oGFb+mTxKoAI9dVwxueZXyqjfvS+nV8Vvh+Ji8JAnE8TNFNjA4ibje/4sG7y1eWHcXFP62UIzApGurJcZZ8svIOLMAo0J9sumEQWpfxZ/i1eQRFhs7PvS/ieN0s1mqQ4RlysllSxvgSoNP3hTcuyNWiRFPIoskMDOzrwLPJ69ew= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676942766; h=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=1YnqaeXgTu+v8DNUsabIh4l5M9MMZ/FkEDT0N4nVdwk=; b=BkDf2ma/Ef7LJrdcNO6cJ+3Y8TMHNKpX+5MfsY2L/IU56ErEmqCkwwrHYEm/u+971uSL0iGg0Ni2EC+/G0H4vaXuY8GO/t2VbIlhsmPMcNcUYKcEfe6jUqYxccu6ublqsCHjbIvXBd88YTkH6pfdBnaWfLnWrYg3WV5wTwYl4ws= 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 1676942766043787.2759787152561; Mon, 20 Feb 2023 17:26:06 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUHP8-0003AQ-N2; Mon, 20 Feb 2023 20:25:14 -0500 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 1pUHP5-00039X-Iq for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUHP3-0006BA-Hx for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:11 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-257-rlXjSyEXP_ON1CAp4BsXoQ-1; Mon, 20 Feb 2023 20:25:00 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 88B00811E6E; Tue, 21 Feb 2023 01:24:59 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.32.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id F10542166B26; Tue, 21 Feb 2023 01:24:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676942708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1YnqaeXgTu+v8DNUsabIh4l5M9MMZ/FkEDT0N4nVdwk=; b=jAw3VyHutqwePx7kA+i+CeIteTTU37ihsXftQsjy95MMT3DrycivpqdMPo1qhSIFY+mjVG iulPRycB7O2liCl2zNXbpIWnHsiqKhTvog2caEAUniQ8vUUzaU0sKmxMTD+uZKs/f8MJaZ srtrYDGvqw8+iDnYMsgcAN04RFavAxQ= X-MC-Unique: rlXjSyEXP_ON1CAp4BsXoQ-1 From: John Snow To: qemu-devel@nongnu.org Cc: Michael Roth , Thomas Huth , qemu-block@nongnu.org, Cleber Rosa , Markus Armbruster , Paolo Bonzini , John Snow , Wainer dos Santos Moschetta , Peter Maydell , Beraldo Leal , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Hanna Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Berrange Subject: [PATCH v3 4/6] DO-NOT-MERGE: testing: add pip-installed sphinx-build to CentOS 8 Date: Mon, 20 Feb 2023 20:24:54 -0500 Message-Id: <20230221012456.2607692-5-jsnow@redhat.com> In-Reply-To: <20230221012456.2607692-1-jsnow@redhat.com> References: <20230221012456.2607692-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.129.124; envelope-from=jsnow@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 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: 1676942767454100005 Content-Type: text/plain; charset="utf-8" This is just for sake of demonstration again; by modifying the dockerfile we can continue to support building docs on CentOS 8 with minimal pain. Note: This uses pip to install packages as root; this is hygienically not a *great* idea for arbitrary systems. For CI, I am abusing the fact that this is a custom-built environment that does not get altered after being built. Individual developers should almost certainly just use a virtual environment to avoid interfering with their system. That process can look like this: 1. Install the new python interpreter: > sudo dnf install python38 2. Go to a folder where you'd be happy to store some python crud: > cd ~/.cache 3. Create a virtual environment using the new python: > python3.8 -m venv qemu_venv 4. Install a modern version of sphinx into this venv: > ./qemu_venv/bin/pip install sphinx 5. Try running sphinx-build: > ./qemu_venv/bin/sphinx-build --help From here, you can specify ~/.cache/qemu_venv/bin/sphinx-build as your sphinx binary to configure in order to get doc building. This approach doesn't interfere with anything; it requires you specifically to opt into using it, which is likely the safest option if you don't have a lot of Python knowhow. Signed-off-by: John Snow --- tests/docker/dockerfiles/centos8.docker | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/docker/dockerfiles/centos8.docker b/tests/docker/dockerf= iles/centos8.docker index a3bfddf382d..a53ccada55a 100644 --- a/tests/docker/dockerfiles/centos8.docker +++ b/tests/docker/dockerfiles/centos8.docker @@ -129,6 +129,10 @@ RUN dnf distro-sync -y && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/g++ && \ ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/gcc =20 +RUN /usr/bin/python3.8 -m ensurepip && \ + /usr/bin/python3.8 -m pip --no-cache-dir install sphinx sphinx-rtd-the= me + + ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers" ENV LANG "en_US.UTF-8" ENV MAKE "/usr/bin/make" --=20 2.39.0 From nobody Mon May 13 23:05:03 2024 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=1676942790; cv=none; d=zohomail.com; s=zohoarc; b=dYXzShzQJdEhQhPd4VQz/zQ3FOZ+doBx1vFdjfcVGMA1TxMbf9u7tsZFtLDrb8twXg2DnlSpOICdLeWABDN215EY8YazCgvIuxktM5PzMZqDWVWVKrvv+nb38jdBz1Fm0USM2C1/1Nr+EMKq2Spm4pPv1lAE+SNuX5U6uuqsNzQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676942790; h=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=/ogucinFRNATjRc0oZLavhSDtGzBtZnYQ0vhDRyNjVw=; b=fl+i8iX8cjcRum87hsp8GtvJ1lhoU4myypQNV/Ks4Sa0Yesfs5tq+Lszajbzl1t5q0Xp1sEe9jnVWA84U/1z9/16LykSXPEGGGLt/bRAayZm1SshslpRY7ml8PqoVk3yriaoOaW6z1GVCEYp6BVJTMixiNvsivA4pZ4lW2iZZJ0= 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 1676942790983804.5024225120899; Mon, 20 Feb 2023 17:26:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUHP4-00038y-Hw; Mon, 20 Feb 2023 20:25:10 -0500 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 1pUHP1-00037i-5X for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:07 -0500 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 1pUHOz-0006A5-JJ for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:06 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-596-cjrj8s1sPyWo7-vXyKIKmQ-1; Mon, 20 Feb 2023 20:25:00 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2C11885D060; Tue, 21 Feb 2023 01:25:00 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.32.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 988B22166B26; Tue, 21 Feb 2023 01:24:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676942704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/ogucinFRNATjRc0oZLavhSDtGzBtZnYQ0vhDRyNjVw=; b=HMO17cE5riNXjIGEkQwFDeYFIDWeBA/LXKFWRmSs0ydSTFhmFq6q36fTK26N+ZDmwkV5fW yfV7pkEtW+eS5s0TLOem0x6McHmnIGAmfJcKzti29LrdgXWgl+Gh5QcVAPnX0SAqyqjPb4 pkrFuJiXWd/nwVdNy5UKJ2QN49kKJpY= X-MC-Unique: cjrj8s1sPyWo7-vXyKIKmQ-1 From: John Snow To: qemu-devel@nongnu.org Cc: Michael Roth , Thomas Huth , qemu-block@nongnu.org, Cleber Rosa , Markus Armbruster , Paolo Bonzini , John Snow , Wainer dos Santos Moschetta , Peter Maydell , Beraldo Leal , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Hanna Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Berrange Subject: [PATCH v3 5/6] meson: prefer 'sphinx-build' to 'sphinx-build-3' Date: Mon, 20 Feb 2023 20:24:55 -0500 Message-Id: <20230221012456.2607692-6-jsnow@redhat.com> In-Reply-To: <20230221012456.2607692-1-jsnow@redhat.com> References: <20230221012456.2607692-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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=jsnow@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 autolearn=unavailable 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: 1676942791519100001 Content-Type: text/plain; charset="utf-8" Once upon a time, "sphinx-build" on certain RPM platforms invoked specifically a Python 2.x version, while "sphinx-build-3" was a distro shim for the Python 3.x version. These days, none of our supported platforms utilize a 2.x version, so it should be safe to search for 'sphinx-build' prior to 'sphinx-build-3', which will prefer pip/venv installed versions of sphinx if they're available. This adds an extremely convenient ability to test document building ability in QEMU across multiple versions of Sphinx for the purposes of compatibility testing. Signed-off-by: John Snow --- docs/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/meson.build b/docs/meson.build index 9136fed3b73..906034f9a87 100644 --- a/docs/meson.build +++ b/docs/meson.build @@ -1,5 +1,5 @@ if get_option('sphinx_build') =3D=3D '' - sphinx_build =3D find_program(['sphinx-build-3', 'sphinx-build'], + sphinx_build =3D find_program(['sphinx-build', 'sphinx-build-3'], required: get_option('docs')) else sphinx_build =3D find_program(get_option('sphinx_build'), --=20 2.39.0 From nobody Mon May 13 23:05:03 2024 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=1676942764; cv=none; d=zohomail.com; s=zohoarc; b=jgx7LviLe/1/mx031u67Oxm7Jku9izJGxtRP7H0M1wOVMl8mRI8LFaGKIUSW4ncmgGj/k8kHg/9co04/8X8Dxth1+iaJam9A0bAQvNFx1aDjnqYSgrI0cYSS2YfufpZvr9AWOuttw+Ok4KvImFuEGUVy9S4kXV2x4LZ40bhjAjs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1676942764; h=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=1VJojf8W3JK6G3hgK0cSbQSWhYe68QOzR4Gzd5BS8dg=; b=h0ceONsgwlYfcXFKeDZK9FxW1a33rZbSLm10bFmLNNCkwIGgUvFfI7I2oZMsyM7mrTGwG6w2tlVLa4pYK8gTXfdMJVftaEWG+6Ki6u9vqx/OxwTNd95sWy2KdhGqoOpZOZe53Q8bpuctaZLFNRAGiybTN98+CuFe3rHedrU+k9E= 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 1676942764500202.81845927095458; Mon, 20 Feb 2023 17:26:04 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pUHP4-00038z-Uw; Mon, 20 Feb 2023 20:25:11 -0500 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 1pUHP1-00038Q-Mv for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pUHOz-0006A4-Kv for qemu-devel@nongnu.org; Mon, 20 Feb 2023 20:25:07 -0500 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-531-RqJWFgedN8yx-q515CPhCA-1; Mon, 20 Feb 2023 20:25:01 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C670780234E; Tue, 21 Feb 2023 01:25:00 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.32.134]) by smtp.corp.redhat.com (Postfix) with ESMTP id 392F62166B26; Tue, 21 Feb 2023 01:25:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1676942704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1VJojf8W3JK6G3hgK0cSbQSWhYe68QOzR4Gzd5BS8dg=; b=R9uRwMqB8FtAFA7+8bINKkac0hirmx2PpDS3C69wlWLIO/7+Sn2Mfae3vv4Wjp172iAvN7 CQf0iiKKUQ5e9NV/KY/Bbdjys399rCNcMS4CjwBUFOu/eyGjGzBqTRAk6jmMMiPQnVU2Sx x8EoU30sTV9tLOAljlhyi15UNMHawzI= X-MC-Unique: RqJWFgedN8yx-q515CPhCA-1 From: John Snow To: qemu-devel@nongnu.org Cc: Michael Roth , Thomas Huth , qemu-block@nongnu.org, Cleber Rosa , Markus Armbruster , Paolo Bonzini , John Snow , Wainer dos Santos Moschetta , Peter Maydell , Beraldo Leal , Kevin Wolf , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Hanna Reitz , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Daniel Berrange Subject: [PATCH v3 6/6] Python: Drop support for Python 3.6 Date: Mon, 20 Feb 2023 20:24:56 -0500 Message-Id: <20230221012456.2607692-7-jsnow@redhat.com> In-Reply-To: <20230221012456.2607692-1-jsnow@redhat.com> References: <20230221012456.2607692-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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.129.124; envelope-from=jsnow@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 autolearn=unavailable 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: 1676942765431100001 Content-Type: text/plain; charset="utf-8" Python 3.6 was EOL 2021-12-31. Newer versions of upstream libraries have been dropping support for this version and it is becoming more cumbersome to support. Avocado-framework and qemu.qmp each have their own reasons for wanting to drop Python 3.6, but won't until QEMU does. Versions of Python available in our supported build platforms as of today, with optional versions available in parentheses: openSUSE Leap 15.4: 3.6.15 (3.9.10, 3.10.2) CentOS Stream 8: 3.6.8 (3.8.13, 3.9.16) CentOS Stream 9: 3.9.13 Fedora 36: 3.10 Fedora 37: 3.11 Debian 11: 3.9.2 Alpine 3.14, 3.15: 3.9.16 Alpine 3.16, 3.17: 3.10.10 Ubuntu 20.04 LTS: 3.8.10 Ubuntu 22.04 LTS: 3.10.4 NetBSD 9.3: 3.9.13* FreeBSD 12.4: 3.9.16 FreeBSD 13.1: 3.9.16 OpenBSD 7.2: 3.9.16 Note: Our VM tests install 3.7 specifically for freebsd and netbsd; the default for "python" or "python3" in FreeBSD is 3.9.16. NetBSD does not appear to have a default meta-package, but offers several options, the lowest of which is 3.7.15. "python39" appears to be a pre-requisite to one of the other packages we request in tests/vm/netbsd. Since it is safe under our supported platform policy, bump our minimum supported version of Python to 3.7. Signed-off-by: John Snow --- docs/conf.py | 4 ++-- configure | 8 ++++---- python/Makefile | 10 +++++----- python/setup.cfg | 7 +++---- python/tests/minreqs.txt | 2 +- scripts/qapi/mypy.ini | 2 +- 6 files changed, 16 insertions(+), 17 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 73a287a4f27..d40448f35d9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -37,9 +37,9 @@ # 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): +if sys.version_info < (3,7): raise ConfigError( - "QEMU requires a Sphinx that uses Python 3.6 or better\n") + "QEMU requires a Sphinx that uses Python 3.7 or better\n") =20 # 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. diff --git a/configure b/configure index 0d0cca53f09..ea0d0e49b2d 100755 --- a/configure +++ b/configure @@ -594,9 +594,9 @@ esac =20 =20 check_py_version() { - # We require python >=3D 3.6. + # We require python >=3D 3.7. # NB: a True python conditional creates a non-zero return code (Failur= e) - "$1" -c 'import sys; sys.exit(sys.version_info < (3,6))' + "$1" -c 'import sys; sys.exit(sys.version_info < (3,7))' } =20 python=3D @@ -605,7 +605,7 @@ explicit_python=3Dno # Check for $PYTHON, python3, python, then explicitly-versioned interprete= rs. for binary in "${PYTHON-python3}" ${PYTHON:+python3} python \ python3.11 python3.10 python3.9 \ - python3.8 python3.7 python3.6 + python3.8 python3.7 do if has "$binary" then @@ -1058,7 +1058,7 @@ then fi =20 if ! check_py_version "$python"; then - error_exit "Cannot use '$python', Python >=3D 3.6 is required." \ + error_exit "Cannot use '$python', Python >=3D 3.7 is required." \ "Use --python=3D/path/to/python to specify a supported Python= ." \ "Maybe try:" \ " openSUSE Leap 15.3+: zypper install python39" \ diff --git a/python/Makefile b/python/Makefile index c5bd6ff83ac..f660d999143 100644 --- a/python/Makefile +++ b/python/Makefile @@ -9,14 +9,14 @@ help: @echo "make check-minreqs:" @echo " Run tests in the minreqs virtual environment." @echo " These tests use the oldest dependencies." - @echo " Requires: Python 3.6" - @echo " Hint (Fedora): 'sudo dnf install python3.6'" + @echo " Requires: Python 3.7" + @echo " Hint (Fedora): 'sudo dnf install python3.7'" @echo "" @echo "make check-tox:" @echo " Run tests against multiple python versions." @echo " These tests use the newest dependencies." - @echo " Requires: Python 3.6 - 3.10, and tox." - @echo " Hint (Fedora): 'sudo dnf install python3-tox python3.10'" + @echo " Requires: Python 3.7 - 3.11, and tox." + @echo " Hint (Fedora): 'sudo dnf install python3-tox python3.11'" @echo " The variable QEMU_TOX_EXTRA_ARGS can be use to pass extra" @echo " arguments to tox". @echo "" @@ -58,7 +58,7 @@ pipenv check-pipenv: min-venv: $(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate $(QEMU_MINVENV_DIR) $(QEMU_MINVENV_DIR)/bin/activate: setup.cfg tests/minr= eqs.txt @echo "VENV $(QEMU_MINVENV_DIR)" - @python3.6 -m venv $(QEMU_MINVENV_DIR) + @python3.7 -m venv $(QEMU_MINVENV_DIR) @( \ echo "ACTIVATE $(QEMU_MINVENV_DIR)"; \ . $(QEMU_MINVENV_DIR)/bin/activate; \ diff --git a/python/setup.cfg b/python/setup.cfg index 9e923d97628..1e8392a045c 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -14,7 +14,6 @@ classifiers =3D Natural Language :: English Operating System :: OS Independent Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.6 Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 @@ -23,7 +22,7 @@ classifiers =3D Typing :: Typed =20 [options] -python_requires =3D >=3D 3.6 +python_requires =3D >=3D 3.7 packages =3D qemu.qmp qemu.machine @@ -76,7 +75,7 @@ exclude =3D __pycache__, =20 [mypy] strict =3D True -python_version =3D 3.6 +python_version =3D 3.7 warn_unused_configs =3D True namespace_packages =3D True warn_unused_ignores =3D False @@ -158,7 +157,7 @@ multi_line_output=3D3 # of python available on your system to run this test. =20 [tox:tox] -envlist =3D py36, py37, py38, py39, py310, py311 +envlist =3D py37, py38, py39, py310, py311 skip_missing_interpreters =3D true =20 [testenv] diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt index dfb8abb155f..55cc6b41d85 100644 --- a/python/tests/minreqs.txt +++ b/python/tests/minreqs.txt @@ -1,5 +1,5 @@ # This file lists the ***oldest possible dependencies*** needed to run -# "make check" successfully under ***Python 3.6***. It is used primarily +# "make check" successfully under ***Python 3.7***. It is used primarily # by GitLab CI to ensure that our stated minimum versions in setup.cfg # are truthful and regularly validated. # diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 66253564297..3463307ddc7 100644 --- a/scripts/qapi/mypy.ini +++ b/scripts/qapi/mypy.ini @@ -1,7 +1,7 @@ [mypy] strict =3D True disallow_untyped_calls =3D False -python_version =3D 3.6 +python_version =3D 3.7 =20 [mypy-qapi.schema] disallow_untyped_defs =3D False --=20 2.39.0