[oe-commits] [openembedded-core] 14/22: classes/npm: force to rebuild the prebuild addons

git at git.openembedded.org git at git.openembedded.org
Fri Jan 24 11:27:13 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 b88c02636a2beae751f18e46383ae453346b7b6d
Author: Jean-Marie LEMETAYER <jean-marie.lemetayer at savoirfairelinux.com>
AuthorDate: Mon Jan 20 11:26:57 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