diff options
| author | Vyacheslav Yurkov <uvv.mail@gmail.com> | 2021-01-28 19:42:46 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-02-10 23:55:53 +0000 |
| commit | 555c367bb1c8c483ba9f683eb57b956f49f38410 (patch) | |
| tree | bd3606356784c3686734bdcfa5240b313098dad9 /meta/classes | |
| parent | 39897a745ad5c93c4a67aa269978edafae50ff3d (diff) | |
| download | poky-555c367bb1c8c483ba9f683eb57b956f49f38410.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: 1a0ac4d51bdc502ff56a7b57b3a9e72b25ccd7ae)
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: Steve Sakoman <steve@sakoman.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 068032a1e5..f83c6e496e 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 | ||
| @@ -237,9 +239,7 @@ python npm_do_compile() { | |||
| 237 | sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") | 239 | sysroot = d.getVar("RECIPE_SYSROOT_NATIVE") |
| 238 | nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) | 240 | nodedir = os.path.join(sysroot, d.getVar("prefix_native").strip("/")) |
| 239 | configs.append(("nodedir", nodedir)) | 241 | configs.append(("nodedir", nodedir)) |
| 240 | bindir = os.path.join(sysroot, d.getVar("bindir_native").strip("/")) | 242 | configs.append(("python", d.getVar("PYTHON"))) |
| 241 | pythondir = os.path.join(bindir, "python-native", "python") | ||
| 242 | configs.append(("python", pythondir)) | ||
| 243 | 243 | ||
| 244 | # Add node-pre-gyp configuration | 244 | # Add node-pre-gyp configuration |
| 245 | args.append(("target_arch", d.getVar("NPM_ARCH"))) | 245 | args.append(("target_arch", d.getVar("NPM_ARCH"))) |
