make, scripts: Now excplicitly calling python2 executable instead of python

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-01-02 13:12:00 +00:00
commit e68d4eb83b
11 changed files with 23 additions and 16 deletions

View file

@ -45,7 +45,7 @@ else ifeq ($(SWIG_TARGET),android)
else ifeq ($(SWIG_TARGET),python)
PYTHON_VERSION ?= $(basename $(lastword $(shell python --version 2>&1)))
PYTHON_VERSION ?= $(basename $(lastword $(shell python2 --version 2>&1)))
PYTHON_MAJOR_VERSION ?= $(basename $(PYTHON_VERSION))
PYTHON_MINOR_VERSION ?= $(patsubst .%,%,$(suffix $(PYTHON_VERSION)))
@ -60,15 +60,15 @@ else ifeq ($(SWIG_TARGET),python)
SWIG_GENERATED_EXTRA += $(SWIG_PY_MODULE_PYC)
SWIG_INSTALLED_EXTRA += $(SWIG_MODULE_TARGET_DIR)/$(SWIG_PY_MODULE_PYC)
INCLUDE += $(shell pkg-config --cflags python)
BUILD_LDFLAGS += $(shell pkg-config --libs python) $(shell php-config --ldflags --libs)
INCLUDE += $(shell pkg-config --cflags python2)
BUILD_LDFLAGS += $(shell pkg-config --libs python2) $(shell php-config --ldflags --libs)
INSTALL_LIBDIR = $(SWIG_MODULE_TARGET_DIR)
all:
%.pyc: %.py
python -m py_compile $<
python2 -m py_compile $<
else