Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp562931ybb; Fri, 20 Mar 2020 04:15:54 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuIaUn2gC7oJ/eLtw/yIG5e4I8NPJEZLYTpP2lOIkt1ifkxJqWE4KC6m4EPwDpff14PMCPj X-Received: by 2002:a9d:64cd:: with SMTP id n13mr6225905otl.274.1584702954378; Fri, 20 Mar 2020 04:15:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584702954; cv=none; d=google.com; s=arc-20160816; b=WtdPmXe9huQB4zbHXmcP1G2h2a1Vt5YDV54oQm6sFF5BUYycfBDTwm8yFaYU1Hz6Lx DKUR/gQHded5INKVBHWqeL1XhCsdLoJwOKKU3zUEZSPTXwXh4cu4+nqhOZlA8EKoqAF7 lo15tVLcw5ZrD30zHc+kGa1zNz5PszHJgsuMgb/JHnF2HFl3WEURRfI0gNTUWa8gqnnk a7FyQn4xEDuaoLQqt/23KEH2NUdvCsdjr/L/SESEqtGD0gTTRBLPqMsYU5yKCU0yF6aC F0pOpnrkYKOBLNGxz2Bvsf2Cvr3RQL+sYSpY35eOp0D+fZWbDHWHUdrj1SJAqw23vNda FHGA== 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=QlbsFLf0vLFsLKSzIwrbrZrhogHsjJj4xButvjvR/Mw=; b=oaGa9kvePpb7FTdiewBPHGdHrKTK74orfO2utD8VAhZDFxCYsZ3sIBHwYBN3aC/sh/ D6dBgk9NCl8hrOh/gZVf/UzBzBPgisEQqXOsv2dKFiooVTlHUn0uTShbCcybCb/3Y73b go4eMm/40q9by9/6fR6OgZ7C7faFMuPt8OnWfCO6WF8mC3BJwvwwWcCjVAZUDrXlwwqC xFI/Cg51CHEG6FWS939KpTwd5Ndv21nBTBPK6EK0fYeuO+QvLku6+w1d43P/UT2ECq+M cUlBiYVcUm4tyPTmtytxqxdmdQiV3xm2MOQjLjxcOzsQQAJiX03GsbD+xPfUVfc86XxU n2kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="YNR/CgON"; 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 v22si2487704oic.271.2020.03.20.04.15.41; Fri, 20 Mar 2020 04:15:54 -0700 (PDT) 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="YNR/CgON"; 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 S1726843AbgCTLPZ (ORCPT + 99 others); Fri, 20 Mar 2020 07:15:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:57210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726726AbgCTLPZ (ORCPT ); Fri, 20 Mar 2020 07:15:25 -0400 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 4432B2072D; Fri, 20 Mar 2020 11:15:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584702924; bh=Lz45XJSItgomZBBzuFY63Z+gO2y+DDRrUTRwkA9EJWU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YNR/CgONHssU8a+7sVlGdWb/nmqlD7Zi5m5ourV+TvhXQu6Ejle2jVoxsMJFFipmb dLY2La9YIOsfHwlvVSAToPjhSL/Icj5hcjrNqjrWWjQDip3gUjGtnw0NlFnFb9aGcu buGSmgpSZDfPmdCa4VU6s7U1kpsiWDVIxbbvx5ro= Date: Fri, 20 Mar 2020 12:15:20 +0100 From: Mauro Carvalho Chehab To: Victor Erminpour Cc: corbet@lwn.net, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] docs: Prefer 'python3' when building htmldocs Message-ID: <20200320121505.579fb6cc@coco.lan> In-Reply-To: <1584658842-778-1-git-send-email-victor.erminpour@oracle.com> References: <1584658842-778-1-git-send-email-victor.erminpour@oracle.com> X-Mailer: Claws Mail 3.17.5 (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 Thu, 19 Mar 2020 16:00:42 -0700 Victor Erminpour escreveu: > Prefer 'python3' and 'sphinx-build-3' when building htmldocs. > Building htmldocs fails on systems that don't have 'python' > and 'sphinx-build' installed, but do have 'python3' and > 'sphinx-build-3' available. > > Signed-off-by: Victor Erminpour > --- > Documentation/Makefile | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/Documentation/Makefile b/Documentation/Makefile > index d77bb607aea4..00c400523e15 100644 > --- a/Documentation/Makefile > +++ b/Documentation/Makefile > @@ -11,6 +11,7 @@ endif > > # You can set these variables from the command line. > SPHINXBUILD = sphinx-build > +SPHINXBUILD3 = sphinx-build-3 This will very likely break on some distros. For example, Fedora 31 with a venv configured environment won't have a "sphinx-build-3" program. I have already a patchset addressing this. I'm testing it on several different distros and versions. My plan is to submit the patch series for it after the merge window. If you want to do a sneak pick, there's a version of the patch series on my experimental tree (probably not the latest version): https://git.linuxtv.org/mchehab/experimental.git/log/?h=random_doc_fixes > SPHINXOPTS = > SPHINXDIRS = . > _SPHINXDIRS = $(patsubst $(srctree)/Documentation/%/index.rst,%,$(wildcard $(srctree)/Documentation/*/index.rst)) > @@ -61,11 +62,23 @@ loop_cmd = $(echo-cmd) $(cmd_$(1)) || exit; > # $5 reST source folder relative to $(srctree)/$(src), > # e.g. "media" for the linux-tv book-set at ./Documentation/media > > +HAVE_PYTHON3 := $(shell if which $(PYTHON3) >/dev/null 2>&1; then echo 1; else echo 0; fi) > +HAVE_SPHINX3 := $(shell if which $(SPHINXBUILD3) >/dev/null 2>&1; then echo 1; else echo 0; fi) > +PYTHON_BIN = $(PYTHON) > + > +# If we have both python3 and sphinx-build-3, > +# prefer python3 over python. > +ifeq ($(HAVE_PYTHON3),1) > + ifeq ($(HAVE_SPHINX3),1) > + PYTHON_BIN = $(PYTHON3) > + endif > +endif > + > quiet_cmd_sphinx = SPHINX $@ --> file://$(abspath $(BUILDDIR)/$3/$4) > cmd_sphinx = $(MAKE) BUILDDIR=$(abspath $(BUILDDIR)) $(build)=Documentation/media $2 && \ > PYTHONDONTWRITEBYTECODE=1 \ > BUILDDIR=$(abspath $(BUILDDIR)) SPHINX_CONF=$(abspath $(srctree)/$(src)/$5/$(SPHINX_CONF)) \ > - $(PYTHON) $(srctree)/scripts/jobserver-exec \ > + $(PYTHON_BIN) $(srctree)/scripts/jobserver-exec \ > $(SHELL) $(srctree)/Documentation/sphinx/parallel-wrapper.sh \ > $(SPHINXBUILD) \ > -b $2 \ Thanks, Mauro