diff options
author | Vyacheslav Yurkov <uvv.mail@gmail.com> | 2021-01-28 19:42:46 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-01-30 10:41:03 +0000 |
commit | 4bb1a003de1b9ec9ad51e7b25fb1c6b84efd6837 (patch) | |
tree | 128d9f2af0da735a68889fa397fe0fc2c001ad34 /meta/classes | |
parent | 68009e4cda7f201db4c73ed55f67d3f8d78eaf30 (diff) | |
download | poky-4bb1a003de1b9ec9ad51e7b25fb1c6b84efd6837.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: d21f50ecf8e8683a92b7d234fa8225c2c1470595)
Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/npm.bbclass | 6 |
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 | ||
20 | inherit python3native | ||
21 | |||
20 | DEPENDS_prepend = "nodejs-native " | 22 | DEPENDS_prepend = "nodejs-native " |
21 | RDEPENDS_${PN}_prepend = "nodejs " | 23 | RDEPENDS_${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"))) |