Skip to content

Commit

Permalink
Do not assume python is an interpreter for Python 2
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Marco Schulze committed Apr 8, 2013
1 parent c617e7d commit 9790e46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile.in
Expand Up @@ -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 \
Expand All @@ -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 . \
Expand Down
1 change: 1 addition & 0 deletions configure
Expand Up @@ -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
Expand Down

0 comments on commit 9790e46

Please sign in to comment.