Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:python-eapi6 commit in: eclass/
Date: Thu, 26 Nov 2015 22:35:36
Message-Id: 1448577181.1069bc7325f5d7f145bfa5c6a27b53c3ae75e91a.mgorny@gentoo
1 commit: 1069bc7325f5d7f145bfa5c6a27b53c3ae75e91a
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 19 15:25:49 2015 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 26 22:33:01 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1069bc73
7
8 python-utils-r1.eclass: Move ||die out of command substitution subshells
9
10 eclass/python-utils-r1.eclass | 15 +++++++++------
11 1 file changed, 9 insertions(+), 6 deletions(-)
12
13 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
14 index 5487158..83a31b2 100644
15 --- a/eclass/python-utils-r1.eclass
16 +++ b/eclass/python-utils-r1.eclass
17 @@ -281,12 +281,14 @@ python_export() {
18 # sysconfig can't be used because:
19 # 1) pypy doesn't give site-packages but stdlib
20 # 2) jython gives paths with wrong case
21 - export PYTHON_SITEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())' || die)
22 + PYTHON_SITEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_lib())') || die
23 + export PYTHON_SITEDIR
24 debug-print "${FUNCNAME}: PYTHON_SITEDIR = ${PYTHON_SITEDIR}"
25 ;;
26 PYTHON_INCLUDEDIR)
27 [[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it"
28 - export PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())' || die)
29 + PYTHON_INCLUDEDIR=$("${PYTHON}" -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())') || die
30 + export PYTHON_INCLUDEDIR
31 debug-print "${FUNCNAME}: PYTHON_INCLUDEDIR = ${PYTHON_INCLUDEDIR}"
32
33 # Jython gives a non-existing directory
34 @@ -296,7 +298,8 @@ python_export() {
35 ;;
36 PYTHON_LIBPATH)
37 [[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it"
38 - export PYTHON_LIBPATH=$("${PYTHON}" -c 'import os.path, sysconfig; print(os.path.join(sysconfig.get_config_var("LIBDIR"), sysconfig.get_config_var("LDLIBRARY")) if sysconfig.get_config_var("LDLIBRARY") else "")' || die)
39 + PYTHON_LIBPATH=$("${PYTHON}" -c 'import os.path, sysconfig; print(os.path.join(sysconfig.get_config_var("LIBDIR"), sysconfig.get_config_var("LDLIBRARY")) if sysconfig.get_config_var("LDLIBRARY") else "")') || die
40 + export PYTHON_LIBPATH
41 debug-print "${FUNCNAME}: PYTHON_LIBPATH = ${PYTHON_LIBPATH}"
42
43 if [[ ! ${PYTHON_LIBPATH} ]]; then
44 @@ -309,7 +312,7 @@ python_export() {
45 case "${impl}" in
46 python*)
47 # python-2.7, python-3.2, etc.
48 - val=$($(tc-getPKG_CONFIG) --cflags ${impl/n/n-} || die)
49 + val=$($(tc-getPKG_CONFIG) --cflags ${impl/n/n-}) || die
50 ;;
51 *)
52 die "${impl}: obtaining ${var} not supported"
53 @@ -325,7 +328,7 @@ python_export() {
54 case "${impl}" in
55 python*)
56 # python-2.7, python-3.2, etc.
57 - val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-} || die)
58 + val=$($(tc-getPKG_CONFIG) --libs ${impl/n/n-}) || die
59 ;;
60 *)
61 die "${impl}: obtaining ${var} not supported"
62 @@ -341,7 +344,7 @@ python_export() {
63 case "${impl}" in
64 python*)
65 [[ -n ${PYTHON} ]] || die "PYTHON needs to be set for ${var} to be exported, or requested before it"
66 - flags=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS") or "")' || die)
67 + flags=$("${PYTHON}" -c 'import sysconfig; print(sysconfig.get_config_var("ABIFLAGS") or "")') || die
68 val=${PYTHON}${flags}-config
69 ;;
70 *)