Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 08 Mar 2017 07:36:20
Message-Id: 1488958539.ce87e4f32b37cd41d5f69d089b8ac454ea467974.mgorny@gentoo
1 commit: ce87e4f32b37cd41d5f69d089b8ac454ea467974
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 26 10:02:07 2017 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Mar 8 07:35:39 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce87e4f3
7
8 python-utils-r1.eclass: python_wrapper_setup, fix exporting env
9
10 Fix python_wrapper_setup function to move setting environment variables
11 for PATH and PKG_CONFIG_PATH outside the 'if'. Otherwise, they are only
12 set on the initial invocation of python_wrapper_setup for the particular
13 impl and do not apply to subsequent invocations (e.g. further
14 distutils-r1 phases).
15
16 eclass/python-utils-r1.eclass | 20 ++++++++++----------
17 1 file changed, 10 insertions(+), 10 deletions(-)
18
19 diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
20 index 3937d066a09..0cc5b963998 100644
21 --- a/eclass/python-utils-r1.eclass
22 +++ b/eclass/python-utils-r1.eclass
23 @@ -984,18 +984,18 @@ python_wrapper_setup() {
24 _EOF_
25 chmod +x "${workdir}"/bin/${x} || die
26 done
27 + fi
28
29 - # Now, set the environment.
30 - # But note that ${workdir} may be shared with something else,
31 - # and thus already on top of PATH.
32 - if [[ ${PATH##:*} != ${workdir}/bin ]]; then
33 - PATH=${workdir}/bin${PATH:+:${PATH}}
34 - fi
35 - if [[ ${PKG_CONFIG_PATH##:*} != ${workdir}/pkgconfig ]]; then
36 - PKG_CONFIG_PATH=${workdir}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
37 - fi
38 - export PATH PKG_CONFIG_PATH
39 + # Now, set the environment.
40 + # But note that ${workdir} may be shared with something else,
41 + # and thus already on top of PATH.
42 + if [[ ${PATH##:*} != ${workdir}/bin ]]; then
43 + PATH=${workdir}/bin${PATH:+:${PATH}}
44 + fi
45 + if [[ ${PKG_CONFIG_PATH##:*} != ${workdir}/pkgconfig ]]; then
46 + PKG_CONFIG_PATH=${workdir}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
47 fi
48 + export PATH PKG_CONFIG_PATH
49 }
50
51 # @FUNCTION: python_is_python3