From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Egger Subject: [PATCH][TOOLS] make python check scripts use $(PYTHON) make variable Date: Thu, 9 Jul 2009 17:01:34 +0200 Message-ID: <200907091701.34723.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_OZgVKFNjz0aqQy7" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_OZgVKFNjz0aqQy7 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch makes python check scrpts use of $(PYTHON) make variable. Signed-off-by: Christoph Egger -- ---to satisfy European Law for business letters: Advanced Micro Devices GmbH Karl-Hammerschmidt-Str. 34, 85609 Dornach b. Muenchen Geschaeftsfuehrer: Thomas M. McCoy, Giuliano Meroni Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632 --Boundary-00=_OZgVKFNjz0aqQy7 Content-Type: text/x-diff; charset="us-ascii"; name="xen_check_python.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_check_python.diff" diff -r f964ec304363 tools/check/Makefile --- a/tools/check/Makefile Thu Jul 09 15:26:24 2009 +0100 +++ b/tools/check/Makefile Thu Jul 09 16:56:41 2009 +0200 @@ -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: diff -r f964ec304363 tools/check/check_python --- a/tools/check/check_python Thu Jul 09 15:26:24 2009 +0100 +++ b/tools/check/check_python Thu Jul 09 16:56:41 2009 +0200 @@ -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" diff -r f964ec304363 tools/check/check_python_devel --- a/tools/check/check_python_devel Thu Jul 09 15:26:24 2009 +0100 +++ b/tools/check/check_python_devel Thu Jul 09 16:56:41 2009 +0200 @@ -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"): diff -r f964ec304363 tools/check/check_python_xml --- a/tools/check/check_python_xml Thu Jul 09 15:26:24 2009 +0100 +++ b/tools/check/check_python_xml Thu Jul 09 16:56:41 2009 +0200 @@ -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" --Boundary-00=_OZgVKFNjz0aqQy7 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_OZgVKFNjz0aqQy7--