[oe-commits] [openembedded-core] 06/14: classes/npm: force to rebuild the prebuild addons
git at git.openembedded.org
git at git.openembedded.org
Fri Jan 24 17:55:00 UTC 2020
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master-next
in repository openembedded-core.
commit 652f4863673b2e36b494d7252f2528b4c7c04392
Author: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
AuthorDate: Fri Jan 24 18:07:35 2020 +0100
classes/npm: force to rebuild the prebuild addons
This commit forces to rebuild the prebuild addons which are using
node-gyp-build.
https://www.npmjs.com/package/node-gyp-build
Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
meta/classes/npm.bbclass | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index b7c9c40..068032a 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -216,6 +216,7 @@ python npm_do_compile() {
dev = bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False)
with tempfile.TemporaryDirectory() as tmpdir:
+ args = []
configs = []
if dev:
@@ -240,9 +241,13 @@ python npm_do_compile() {
pythondir = os.path.join(bindir, "python-native", "python")
configs.append(("python", pythondir))
+ # Add node-pre-gyp configuration
+ args.append(("target_arch", d.getVar("NPM_ARCH")))
+ args.append(("build-from-source", "true"))
+
# Pack and install the main package
tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir)
- env.run("npm install %s" % shlex.quote(tarball), configs=configs)
+ env.run("npm install %s" % shlex.quote(tarball), args=args, configs=configs)
}
npm_do_install() {
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list