From: Christoph Egger Subject: [PATCH] tools: simplify install of python "binaries" Date: Wed, 15 Jul 2009 17:09:58 +0200 Message-ID: <200907151709.58431.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-00=_GFfXK5Nn2A+iDy0" 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=_GFfXK5Nn2A+iDy0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi! Attached patch simplifies install of python "binaries". Get rid of get-path. 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=_GFfXK5Nn2A+iDy0 Content-Type: text/x-diff; charset="us-ascii"; name="xen_python.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="xen_python.diff" diff -r 91407452cdb6 tools/misc/Makefile --- a/tools/misc/Makefile Wed Jul 15 13:15:50 2009 +0100 +++ b/tools/misc/Makefile Wed Jul 15 17:01:56 2009 +0200 @@ -25,8 +25,7 @@ INSTALL_BIN := $(INSTALL_BIN-y) INSTALL_SBIN-y := xm xen-bugtool xen-python-path xend xenperf xsview xenpm xen-tmem-list-parse gtraceview gtracestat INSTALL_SBIN := $(INSTALL_SBIN-y) -DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path) -PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH) +PYTHON_PATH ?= $(PYTHON) INSTALL_PYTHON_PROG = $(XEN_ROOT)/tools/python/install-wrap \ "$(PYTHON_PATH)" $(INSTALL_PROG) diff -r 91407452cdb6 tools/python/get-path --- a/tools/python/get-path Wed Jul 15 13:15:50 2009 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -#! /usr/bin/env bash -set -e - -check () { - set +e - p=`type -p python$v` - r=$? - set -e - if [ $r = 0 ]; then - echo >&2 "${0##*/}: will use #!$p for python programs" - printf "%s\n" "$p" - exit 0 - fi -} - -v="$(python -V 2>&1)" -v="${v#* }" -check -v="${v%.*}" -check -echo >&2 'python version not determined, will use env to find python at runtime' -printf "/usr/bin/env python\n" diff -r 91407452cdb6 tools/python/install-wrap --- a/tools/python/install-wrap Wed Jul 15 13:15:50 2009 +0100 +++ b/tools/python/install-wrap Wed Jul 15 17:01:56 2009 +0200 @@ -4,8 +4,7 @@ # where # PYTHON_PATH is what to put after #! and may be `/usr/bin/env python' # -# Used via $(INSTALL_PYTHON_PROG) in Rules.mk; PYTHON_PATH comes from -# .../get-path alongside this script +# Used via $(INSTALL_PYTHON_PROG) in Rules.mk; PYTHON_PATH comes from $(PYTHON) set -e if [ $# -lt 2 ]; then echo >&2 "${0##*/}: too few arguments"; exit 1; fi --Boundary-00=_GFfXK5Nn2A+iDy0 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=_GFfXK5Nn2A+iDy0--