* [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, fix exporting env
@ 2017-02-26 21:54 Michał Górny
2017-03-08 7:41 ` Michał Górny
0 siblings, 1 reply; 2+ messages in thread
From: Michał Górny @ 2017-02-26 21:54 UTC (permalink / raw
To: gentoo-dev; +Cc: Michał Górny
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).
---
eclass/python-utils-r1.eclass | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 572f68fc9828..dd42d2c9aad9 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -985,18 +985,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
--
2.12.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, fix exporting env
2017-02-26 21:54 [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, fix exporting env Michał Górny
@ 2017-03-08 7:41 ` Michał Górny
0 siblings, 0 replies; 2+ messages in thread
From: Michał Górny @ 2017-03-08 7:41 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
W dniu 26.02.2017, nie o godzinie 22∶54 +0100, użytkownik Michał Górny
napisał:
> 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).
> ---
> eclass/python-utils-r1.eclass | 20 ++++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
Merged.
--
Best regards,
Michał Górny
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 963 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-03-08 7:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-26 21:54 [gentoo-dev] [PATCH] python-utils-r1.eclass: python_wrapper_setup, fix exporting env Michał Górny
2017-03-08 7:41 ` Michał Górny
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox