summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorVyacheslav Yurkov <uvv.mail@gmail.com>2021-01-28 19:42:46 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-02-11 17:46:11 +0000
commit67eb23b9075c0fc7a626d27eb2d4eeb8c9e8d939 (patch)
treec6d2fb304104f238c880723024dc954ec319c54a /meta
parent6a35ab437fc78ee3e7a4e24ac682de1c639d1294 (diff)
downloadpoky-67eb23b9075c0fc7a626d27eb2d4eeb8c9e8d939.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. (From OE-Core rev: 5cc15f53d55923815a859009a1ffe6cff145b6d7) 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-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 @@
17# NPM_INSTALL_DEV: 17# NPM_INSTALL_DEV:
18# Set to 1 to also install devDependencies. 18# Set to 1 to also install devDependencies.
19 19
20inherit python3native
21
20DEPENDS_prepend = "nodejs-native " 22DEPENDS_prepend = "nodejs-native "
21RDEPENDS_${PN}_prepend = "nodejs " 23RDEPENDS_${PN}_prepend = "nodejs "
22 24
@@ -248,9 +250,7 @@ python npm_do_compile() {
248 sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") 250 sysroot = d.getVar("RECIPE_SYSROOT_NATIVE")
249 nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) 251 nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/"))
250 configs.append(("nodedir", nodedir)) 252 configs.append(("nodedir", nodedir))
251 bindir = os.path.join(sysroot, d.getVar("bindir_native").strip("/")) 253 configs.append(("python", d.getVar("PYTHON")))
252 pythondir = os.path.join(bindir, "python-native", "python")
253 configs.append(("python", pythondir))
254 254
255 # Add node-pre-gyp configuration 255 # Add node-pre-gyp configuration
256 args.append(("target_arch", d.getVar("NPM_ARCH"))) 256 args.append(("target_arch", d.getVar("NPM_ARCH")))