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 3/8] Clean up python_newscript().
Date: Fri, 13 Sep 2013 18:58:32
Message-Id: 1379098729-2801-4-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-python] Clean up of python eclasses and support for python-exec:2 by "Michał Górny"
1 ---
2 gx86/eclass/python-utils-r1.eclass | 15 +++++++--------
3 1 file changed, 7 insertions(+), 8 deletions(-)
4
5 diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass
6 index 6cc07bd..6cf23f0 100644
7 --- a/gx86/eclass/python-utils-r1.eclass
8 +++ b/gx86/eclass/python-utils-r1.eclass
9 @@ -756,22 +756,21 @@ python_newscript() {
10 [[ ${#} -eq 2 ]] || die "Usage: ${FUNCNAME} <path> <new-name>"
11
12 local d=${python_scriptroot:-${DESTTREE}/bin}
13 - local INSDESTTREE INSOPTIONS
14 -
15 - insinto "${d}"
16 - insopts -m755
17
18 local f=${1}
19 local barefn=${2}
20
21 local newfn=${barefn}-${EPYTHON}
22
23 - debug-print "${FUNCNAME}: ${f} -> ${d}/${newfn}"
24 - newins "${f}" "${newfn}" || die
25 - _python_rewrite_shebang "${ED}/${d}/${newfn}"
26 + (
27 + exeinto "${d}"
28 + newexe "${f}" "${newfn}" || die
29 + )
30 + _python_rewrite_shebang "${ED%/}/${d}/${newfn}"
31
32 # install the wrapper
33 - _python_ln_rel "${ED}"/usr/bin/python-exec "${ED}/${d}/${barefn}" || die
34 + _python_ln_rel "${ED%/}"/usr/bin/python-exec \
35 + "${ED%/}/${d}/${barefn}" || die
36 }
37
38 # @ECLASS-VARIABLE: python_moduleroot
39 --
40 1.8.3.2