diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-02-26 11:02:07 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-03-08 08:35:39 +0100 |
commit | ce87e4f32b37cd41d5f69d089b8ac454ea467974 (patch) | |
tree | b09e849f9d36aa74db4b1faa28e8bca043ff81d3 | |
parent | unpacker.eclass: Replace unnecessary eval with array (diff) | |
download | gentoo-ce87e4f32b37cd41d5f69d089b8ac454ea467974.tar.gz gentoo-ce87e4f32b37cd41d5f69d089b8ac454ea467974.tar.bz2 gentoo-ce87e4f32b37cd41d5f69d089b8ac454ea467974.zip |
python-utils-r1.eclass: python_wrapper_setup, fix exporting env
Fix python_wrapper_setup function to move setting environment variables
for PATH and PKG_CONFIG_PATH outside the 'if'. Otherwise, they are only
set on the initial invocation of python_wrapper_setup for the particular
impl and do not apply to subsequent invocations (e.g. further
distutils-r1 phases).
-rw-r--r-- | eclass/python-utils-r1.eclass | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass index 3937d066a095..0cc5b963998e 100644 --- a/eclass/python-utils-r1.eclass +++ b/eclass/python-utils-r1.eclass @@ -984,18 +984,18 @@ python_wrapper_setup() { _EOF_ chmod +x "${workdir}"/bin/${x} || die done + fi - # Now, set the environment. - # But note that ${workdir} may be shared with something else, - # and thus already on top of PATH. - if [[ ${PATH##:*} != ${workdir}/bin ]]; then - PATH=${workdir}/bin${PATH:+:${PATH}} - fi - if [[ ${PKG_CONFIG_PATH##:*} != ${workdir}/pkgconfig ]]; then - PKG_CONFIG_PATH=${workdir}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} - fi - export PATH PKG_CONFIG_PATH + # Now, set the environment. + # But note that ${workdir} may be shared with something else, + # and thus already on top of PATH. + if [[ ${PATH##:*} != ${workdir}/bin ]]; then + PATH=${workdir}/bin${PATH:+:${PATH}} + fi + if [[ ${PKG_CONFIG_PATH##:*} != ${workdir}/pkgconfig ]]; then + PKG_CONFIG_PATH=${workdir}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} fi + export PATH PKG_CONFIG_PATH } # @FUNCTION: python_is_python3 |