[OE-core] [PATCH v4 04/13] classes/npm: use the native python
Jean-Marie LEMETAYER
jean-marie.lemetayer at savoirfairelinux.com
Fri Jan 17 16:46:00 UTC 2020
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.
Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
---
meta/classes/npm.bbclass | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index edeef51033..76321eab06 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -233,6 +233,9 @@ python npm_do_compile() {
sysroot = d.getVar("RECIPE_SYSROOT_NATIVE")
nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/"))
configs.append(("nodedir", nodedir))
+ bindir = os.path.join(sysroot, d.getVar("bindir_native").strip("/"))
+ pythondir = os.path.join(bindir, "python-native", "python")
+ configs.append(("python", pythondir))
# Pack and install the main package
tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir)
--
2.20.1
More information about the Openembedded-core
mailing list