Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp4846920ybf; Wed, 4 Mar 2020 11:53:32 -0800 (PST) X-Google-Smtp-Source: ADFU+vt4x57wX7LLY6aMak7dBH9K1afEn+WJFrIXjgzQ9F+nx9Oj6q8f563akfkGJPwaIBKa1b8X X-Received: by 2002:a05:6808:b13:: with SMTP id s19mr2843728oij.119.1583351612851; Wed, 04 Mar 2020 11:53:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1583351612; cv=none; d=google.com; s=arc-20160816; b=GBT51H1EVoxPRKFwVYWDd5Dodzf8KwgPkYvgnJoZyX/bFEdcTJ4HXD5nAM2qQLuTh9 0wrxXnNlLvN+3nPOhJwOBoetmMEmY8DOdqKmLYn4ck2nfTIZeGTM+yseEItHGGmSvTuT sAkasY3BOvIrrrLsvhP2zOh9kXZVzGVjj/tqoXphZMuww9vaLOsUeIYzuHYcfmgLbzKr VvUPDVcT0AR7vhPwTJBz+fc/dvhbCdken65cKuX4s5y2yv/uiVOYuKmwM+5mUFcB3XxB fGz52AIty8lnRIzVMpovjZ7NpJquys8KtHnZcIEOfY9xcMD7Ce05sP2AyCU9Y8D1y+u9 zzmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=aq/7EvlW/KsuDUnGX06MmaK9mXoadMkyRhcf2Y9z05U=; b=bOSGU1x0HHQeZPSUC84FIOa5VLvw2Dda8IEOLFNnXMZULE/hEIRoFw7iYq5hcdy4Aj FouDrQyKLDSgfoV6s8n8XHHpIhZWQ8KdactCAJ7zeAHA4cYGZ7WlR38ZAqpeeeqmViAv NHhJ4gzYIhFkA+qJ/UZkq0puR4+le88x6L4O+acf993Ixx3pTxwgiZS4CvM8qi6ccSuu yfal4G3ivWKEP0KzJhdGcZUCR+8yIAtWxSqC+DwNibICOgytI7xCqEf+EsGJuQI2pyuY bMqW6I/mSPF+6AuUNy4r8XiHrL2Tt1yeurmLYkyXhec2rcm81Gt5q5ZiPyMxkEy4n/ke 18BA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bkbUz2MG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si1821302otm.71.2020.03.04.11.53.21; Wed, 04 Mar 2020 11:53:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bkbUz2MG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729286AbgCDTxL (ORCPT + 99 others); Wed, 4 Mar 2020 14:53:11 -0500 Received: from mail.kernel.org ([198.145.29.99]:52484 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728955AbgCDTxL (ORCPT ); Wed, 4 Mar 2020 14:53:11 -0500 Received: from coco.lan (ip5f5ad4e9.dynamic.kabel-deutschland.de [95.90.212.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 75F6521556; Wed, 4 Mar 2020 19:53:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583351590; bh=0lTNiqZihmhD7dU5xCTNqpQeoONQroZErkdsf+IQ3/Q=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=bkbUz2MGPto95211PrLHnmVLW09hqCkKIoImnDXStIZdoPSH+iXesJndKimBINClM 14U6bHtjKEJRVSLW++vtxwlnlzx0bpYrVIwGeHv2sI24xDaFuseQlNp1/remEX/8HA bpBCBeXx1Xl2SdoAmct30hoL33ahPlRePrwEC3l4= Date: Wed, 4 Mar 2020 20:53:05 +0100 From: Mauro Carvalho Chehab To: "Bird, Tim" Cc: Jonathan Corbet , "tbird20d@gmail.com" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] scripts/sphinx-pre-install: add '-p python3' to virtualenv Message-ID: <20200304205252.51bac986@coco.lan> In-Reply-To: References: <1582594481-23221-1-git-send-email-tim.bird@sony.com> <20200302130911.05a7e465@lwn.net> <20200303130152.461c3494@lwn.net> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 4 Mar 2020 17:25:41 +0000 "Bird, Tim" escreveu: > > -----Original Message----- > > From: Jonathan Corbet > > > > On Tue, 3 Mar 2020 17:07:48 +0000 > > "Bird, Tim" wrote: > > > > > The less fragile approach would have been to just > > > always add the '-p python3' option to the virtualenv setup hint, > > > but Mauro seemed to want something more fine-tuned. > > > > At some point I think we'll want to say that Python 2 just isn't supported > > anymore. After all, the language itself isn't supported anymore. Perhaps > > it's time to add a warning somewhere. > > Probably. IMHO always adding the 'p python3' would have been the > first vestiges of such a hint, but maybe it should be more explicit. > A more explicit statement of "watch out if your default python > interpreter is python2" would have probably shortened some of > my setup time. A warning like that makes sense to me. > Ubuntu 16.04 and Ubuntu 18.04 both include python3, but have > /usr/bin/python default to python2. So, while the package recommendations > from the script were good (and sufficient), the virtualenv hint was somewhat > lacking. And if you try to change the Ubuntu default to python3, some things break there (I did that last month using alternates on Ubuntu 19.10 - had to revert back to python2). > And, just for full disclosure, I wish there was a way to mark this type of fix > with a obsolescence flag so it could be removed later. This is the type of > thing that gets put into a script as a workaround for a transition period, but > keeps being run 10 years later when it's no longer relevant. Heck, the whole > virtualenv recommendation might be irrelevant in the next version of Ubuntu > (but maybe the script already figures that out.) Actually, virtualenv support was added later ;-) The script supports both virtualenv and distro package install, although the current default is to use virtualenv. You can force it to recommend the distro package with: $ ./scripts/sphinx-pre-install --no-virtualenv Detected OS: Fedora release 30 (Thirty). ERROR: please install "python-sphinx", otherwise, build won't work. Warning: better to also install "sphinx_rtd_theme". You should run: sudo dnf install -y python3-sphinx python3-sphinx_rtd_theme Can't build as 1 mandatory dependency is missing at ./scripts/sphinx-pre-install line 721. The main reason why virtualenv is the default is that we need to ensure a certain minimal version (nowadays, it is recommended at least 1.7.9). If one is using a LTS distro, the distro-package could be older than that. With virtualenv, it is easier to fulfill the minimal version (and the recommended one). You may even have multiple Sphinx versions, with is quite useful when trying to identify if the html and/or pdf output is doing the right thing with different toolchain versions. Thanks, Mauro