From ae116c2430f9c990dcf619f4b8f90b2fc0c18984 Mon Sep 17 00:00:00 2001
From: Krzysztof Blazewicz <blazewicz.krzysztof@gmail.com>
Date: Sat, 25 Feb 2017 13:50:19 +0100
Subject: [PATCH] docs/Makefile: define and use PYTHON as the interpreter for
 CPYDIFF

User can override PYTHON executable before running script,
gen-cpydiff.py works only with Python3 and most systems register
its executable as 'python3'.
---
 docs/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/Makefile b/docs/Makefile
index b4e338ad5..e9c128e90 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -2,6 +2,7 @@
 #
 
 # You can set these variables from the command line.
+PYTHON        = python3
 SPHINXOPTS    =
 SPHINXBUILD   = sphinx-build
 PAPER         =
@@ -60,7 +61,7 @@ clean:
 cpydiff:
 	@echo "Generating MicroPython Differences."
 	rm -f $(GENRSTDIR)/*
-	cd $(CPYDIFFDIR) && python $(CPYDIFF)
+	cd $(CPYDIFFDIR) && $(PYTHON) $(CPYDIFF)
 
 html: cpydiff
 	$(SPHINXBUILD) $(FORCE) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
-- 
GitLab