summaryrefslogtreecommitdiffstats
path: root/meta/classes/npm.bbclass
diff options
context:
space:
mode:
authorJean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com>2020-01-24 18:07:35 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-01-27 16:48:09 +0000
commit4662963b2c26b1b8008ea591bbbf5840f0695a6a (patch)
tree165d332b84eae26f20b57ab4a571d489355e349a /meta/classes/npm.bbclass
parentfc516a65b343d5fa95b74aabba48f75e6315da14 (diff)
downloadpoky-4662963b2c26b1b8008ea591bbbf5840f0695a6a.tar.gz
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 (From OE-Core rev: dc4dda4d459ef66246cb7fb6f7d667c982707544) Signed-off-by: Jean-Marie LEMETAYER <jean-marie.lemetayer@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/npm.bbclass')
-rw-r--r--meta/classes/npm.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/npm.bbclass b/meta/classes/npm.bbclass
index b7c9c40811..068032a1e5 100644
--- a/meta/classes/npm.bbclass
+++ b/meta/classes/npm.bbclass
@@ -216,6 +216,7 @@ python npm_do_compile() {
216 dev = bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False) 216 dev = bb.utils.to_boolean(d.getVar("NPM_INSTALL_DEV"), False)
217 217
218 with tempfile.TemporaryDirectory() as tmpdir: 218 with tempfile.TemporaryDirectory() as tmpdir:
219 args = []
219 configs = [] 220 configs = []
220 221
221 if dev: 222 if dev:
@@ -240,9 +241,13 @@ python npm_do_compile() {
240 pythondir = os.path.join(bindir, "python-native", "python") 241 pythondir = os.path.join(bindir, "python-native", "python")
241 configs.append(("python", pythondir)) 242 configs.append(("python", pythondir))
242 243
244 # Add node-pre-gyp configuration
245 args.append(("target_arch", d.getVar("NPM_ARCH")))
246 args.append(("build-from-source", "true"))
247
243 # Pack and install the main package 248 # Pack and install the main package
244 tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir) 249 tarball = npm_pack(env, d.getVar("NPM_PACKAGE"), tmpdir)
245 env.run("npm install %s" % shlex.quote(tarball), configs=configs) 250 env.run("npm install %s" % shlex.quote(tarball), args=args, configs=configs)
246} 251}
247 252
248npm_do_install() { 253npm_do_install() {