summaryrefslogtreecommitdiffstats
path: root/meta/classes/npm.bbclass
diff options
context:
space:
mode:
authorVyacheslav Yurkov <uvv.mail@gmail.com>2021-01-28 19:42:46 +0100
committerAnuj Mittal <anuj.mittal@intel.com>2021-02-06 14:53:56 +0800
commit5cc15f53d55923815a859009a1ffe6cff145b6d7 (patch)
tree7f009da7b63bfb0af093985fdac6fae942ca82ea /meta/classes/npm.bbclass
parent6bcd2e242ef85cf875a2ea1a7c208f8c30fbdffa (diff)
downloadopenembedded-core-contrib-5cc15f53d55923815a859009a1ffe6cff145b6d7.tar.gz
npm.bbclass: use python3 for npm config
python2-native executable is not available in sysroot anymore, which causes compilation of some nodejs modules to fail. Switch to python3 as a default python version. Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit d21f50ecf8e8683a92b7d234fa8225c2c1470595) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Diffstat (limited to 'meta/classes/npm.bbclass')
-rw-r--r--meta/classes/npm.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index d3dd1a9ab8..79f55febcc 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -17,6 +17,8 @@
# NPM_INSTALL_DEV:
# Set to 1 to also install devDependencies.
+inherit python3native
+
DEPENDS_prepend = "nodejs-native "
RDEPENDS_${PN}_prepend = "nodejs "
@@ -248,9 +250,7 @@ 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))
+ configs.append(("python", d.getVar("PYTHON")))
# Add node-pre-gyp configuration
args.append(("target_arch", d.getVar("NPM_ARCH")))