diff options
Diffstat (limited to 'meta/classes/npm.bbclass')
-rw-r--r-- | meta/classes/npm.bbclass | 7 |
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 | ||
248 | npm_do_install() { | 253 | npm_do_install() { |