Commit 66ff5985 authored by Keir Fraser's avatar Keir Fraser

Make python check scripts use of $(PYTHON) make variable.

Signed-off-by: default avatarChristoph Egger <Christoph.Egger@amd.com>
parent d75ce705
......@@ -7,12 +7,12 @@ all install: check-build
# Check this machine is OK for building on.
.PHONY: check-build
check-build:
LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk build
PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk build
# Check this machine is OK for installing on.
.PHONY: check-install
check-install:
LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk install
PYTHON=$(PYTHON) LIBXENAPI_BINDINGS=$(LIBXENAPI_BINDINGS) ACM_SECURITY=$(ACM_SECURITY) ./chk install
.PHONY: clean
clean:
......
......@@ -3,7 +3,11 @@
. ./funcs.sh
python -c '
if test -z ${PYTHON}; then
PYTHON=`/usr/bin/env python 2>/dev/null`
fi
${PYTHON} -c '
import sys
sys.exit(sys.version_info[0] < 2 or sys.version_info[1] < 2)
' || fail "need python version >= 2.2"
......@@ -3,7 +3,12 @@
. ./funcs.sh
python -c '
if test -z ${PYTHON}; then
PYTHON=`/usr/bin/env python 2>/dev/null`
fi
has_or_fail ${PYTHON}
${PYTHON} -c '
import os.path, sys
for p in sys.path:
if os.path.exists(p + "/config/Makefile"):
......
......@@ -3,5 +3,10 @@
. ./funcs.sh
python -c 'import xml.dom.minidom' 2>/dev/null || \
if test -z ${PYTHON}; then
PYTHON=`/usr/bin/env python 2>/dev/null`
fi
has_or_fail ${PYTHON}
${PYTHON} -c 'import xml.dom.minidom' 2>/dev/null || \
fail "can't import xml.dom.minidom"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment