From 9790e462692bb3c18b96b8e7b14faabc3fcdb299 Mon Sep 17 00:00:00 2001 From: Marco Schulze Date: Mon, 8 Apr 2013 17:22:20 -0300 Subject: [PATCH] Do not assume python is an interpreter for Python 2 On some distributions and configurations, the python command might refer to python3 instead of python2, breaking the build. Fix this by using the first of python2, python2.7, or python. --- Makefile.in | 4 ++-- configure | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index 8274db6eadc..6f2b962d416 100644 --- a/Makefile.in +++ b/Makefile.in @@ -190,7 +190,7 @@ bindinggen_dependencies := $(addprefix $(BINDINGS_SRC)/, BindingGen.py Bindings. $(AUTOGEN_SRC_servo): %Binding.rs: $(bindinggen_dependencies) \ %.webidl - PYTHONDONTWRITEBYTECODE=1 python $(BINDINGS_SRC)/pythonpath.py \ + PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \ -I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \ -D$(BINDINGS_SRC) \ $(BINDINGS_SRC)/BindingGen.py rs \ @@ -204,7 +204,7 @@ $(CACHE_DIR)/.done: $(BINDINGS_SRC)/ParserResults.pkl: $(globalgen_dependencies) \ $(WEBIDL_servo) - PYTHONDONTWRITEBYTECODE=1 python $(BINDINGS_SRC)/pythonpath.py \ + PYTHONDONTWRITEBYTECODE=1 $(CFG_PYTHON2) $(BINDINGS_SRC)/pythonpath.py \ -I$(BINDINGS_SRC)/parser -I$(BINDINGS_SRC)/ply \ -D$(BINDINGS_SRC) \ $(BINDINGS_SRC)/GlobalGen.py $(BINDINGS_SRC)/Bindings.conf . \ diff --git a/configure b/configure index 2e7ebb59a52..3f3187a205b 100755 --- a/configure +++ b/configure @@ -296,6 +296,7 @@ fi step_msg "looking for build programs" probe_need CFG_GIT git +probe_need CFG_PYTHON2 python2 python2.7 python probe CFG_CLANG clang++ probe CFG_GCC gcc probe CFG_LD ld