From patchwork Mon Mar 22 22:35:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D10251: makefile: use Python 3 by default when building docs as well From: phabricator X-Patchwork-Id: 48567 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Mon, 22 Mar 2021 22:35:38 +0000 martinvonz created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches. REVISION SUMMARY I copied the snippet defining `PYTHON` from the root Makefile. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D10251 AFFECTED FILES doc/Makefile CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/doc/Makefile b/doc/Makefile --- a/doc/Makefile +++ b/doc/Makefile @@ -6,7 +6,14 @@ PREFIX=/usr/local MANDIR=$(PREFIX)/share/man INSTALL=install -m 644 -PYTHON?=python +# Default to Python 3. +# +# Windows ships Python 3 as `python.exe`, which may not be on PATH. py.exe is. +ifeq ($(OS),Windows_NT) +PYTHON?=py -3 +else +PYTHON?=python3 +endif RSTARGS= export HGENCODING=UTF-8