diff options
author | Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> | 2020-01-24 18:07:34 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-01-27 16:48:09 +0000 |
commit | fc516a65b343d5fa95b74aabba48f75e6315da14 (patch) | |
tree | bcff0243609b52d49dfc475dd468f697520edb76 /meta/classes | |
parent | ba5d030b6240db58c0cdefc46a9ee42f1583b694 (diff) | |
download | poky-fc516a65b343d5fa95b74aabba48f75e6315da14.tar.gz |
classes/npm: use the native python
When building addons, the node-gyp build tool is looking for python. It
is available in the native directory but not directly in the PATH.
This commit configures npm to use the native python executable.
(From OE-Core rev: 946fd69cba6f60c531ff34091cda3b7fee8ee594)
Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/npm.bbclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass index 88d8de91e9..b7c9c40811 100644 --- a/meta/classes/npm.bbclass +++ b/meta/classes/npm.bbclass | |||
@@ -236,6 +236,9 @@ python npm_do_compile() { | |||
236 | sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") | 236 | sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") |
237 | nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) | 237 | nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) |
238 | configs.append(("nodedir", nodedir)) | 238 | configs.append(("nodedir", nodedir)) |
239 | bindir = os.path.join(sysroot, d.getVar("bindir_native").strip("/")) | ||
240 | pythondir = os.path.join(bindir, "python-native", "python") | ||
241 | configs.append(("python", pythondir)) | ||
239 | 242 | ||
240 | # Pack and install the main package | 243 | # Pack and install the main package |
241 | tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) | 244 | tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) |