Gentoo Archives: gentoo-python

From: "Michał Górny" <mgorny@g.o>
To: gentoo-python@l.g.o
Cc: python@g.o, "Michał Górny" <mgorny@g.o>
Subject: [gentoo-python] [PATCH python-single-r1 2/2] Example use of python_fix_shebang() (xen-tools).
Date: Sun, 16 Dec 2012 22:52:24
Message-Id: 1355698330-15660-2-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-python] [PATCH python-single-r1 1/2] Introduce python_fix_shebang() for Python scripts in single-r1. by "Michał Górny"
1 ---
2 gx86/app-emulation/xen-tools/xen-tools-4.2.0-r2.ebuild | 6 +-----
3 1 file changed, 1 insertion(+), 5 deletions(-)
4
5 diff --git a/gx86/app-emulation/xen-tools/xen-tools-4.2.0-r2.ebuild b/gx86/app-emulation/xen-tools/xen-tools-4.2.0-r2.ebuild
6 index a3436ae..8de669a 100644
7 --- a/gx86/app-emulation/xen-tools/xen-tools-4.2.0-r2.ebuild
8 +++ b/gx86/app-emulation/xen-tools/xen-tools-4.2.0-r2.ebuild
9 @@ -240,11 +240,7 @@ src_install() {
10 XEN_PYTHON_NATIVE_INSTALL=y install-tools
11
12 # Fix the remaining Python shebangs.
13 - # TODO: add an appropriate func to python-single-r1.
14 - sed -e "1s:python:${EPYTHON}:" \
15 - -i "${ED}"usr/sbin/{xenmon.py,xen-ringwatch} || die 'shebang sed failed'
16 - find "${D}$(python_get_sitedir)" -name '*.py' \
17 - -exec sed -e "1s:python:${EPYTHON}:" -i {} + || die 'shebang find+sed failed'
18 + python_fix_shebang "${ED}"
19
20 # Remove RedHat-specific stuff
21 rm -rf "${ED}"tmp || die
22 --
23 1.8.0.2