Skip to content

Commit 6f0d22d

Browse files
committed
Update emscripten build script to follow documented advice.
1 parent e3766fd commit 6f0d22d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tools/wasm/emscripten/__main__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,12 @@ def make_build_python(context, working_dir):
167167
@subdir(HOST_BUILD_DIR, clean_ok=True)
168168
def make_emscripten_libffi(context, working_dir):
169169
shutil.rmtree(working_dir / "libffi-3.4.6", ignore_errors=True)
170-
with tempfile.NamedTemporaryFile(suffix=".tar.gz") as tmp_file:
170+
with tempfile.NamedTemporaryFile(suffix=".tar.gz", delete_on_close=False) as tmp_file:
171171
with urlopen(
172172
"https://github.com/libffi/libffi/releases/download/v3.4.6/libffi-3.4.6.tar.gz"
173173
) as response:
174174
shutil.copyfileobj(response, tmp_file)
175+
tmp_file.close()
175176
shutil.unpack_archive(tmp_file.name, working_dir)
176177
call(
177178
[EMSCRIPTEN_DIR / "make_libffi.sh"],

0 commit comments

Comments
 (0)