mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
[3.14] gh-135648: Document that shutil.copyfileobj doesn't flush (GH-135737) (#135873)
Adds a note about flush/close on copyfileobj, and updates
the Emscripten build script to follow documented advice.
(cherry picked from commit 34393cbdd4)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
This commit is contained in:
parent
7227aa4bfa
commit
148f31f2d8
2 changed files with 9 additions and 1 deletions
|
|
@ -167,11 +167,12 @@ def make_build_python(context, working_dir):
|
|||
@subdir(HOST_BUILD_DIR, clean_ok=True)
|
||||
def make_emscripten_libffi(context, working_dir):
|
||||
shutil.rmtree(working_dir / "libffi-3.4.6", ignore_errors=True)
|
||||
with tempfile.NamedTemporaryFile(suffix=".tar.gz") as tmp_file:
|
||||
with tempfile.NamedTemporaryFile(suffix=".tar.gz", delete_on_close=False) as tmp_file:
|
||||
with urlopen(
|
||||
"https://github.com/libffi/libffi/releases/download/v3.4.6/libffi-3.4.6.tar.gz"
|
||||
) as response:
|
||||
shutil.copyfileobj(response, tmp_file)
|
||||
tmp_file.close()
|
||||
shutil.unpack_archive(tmp_file.name, working_dir)
|
||||
call(
|
||||
[EMSCRIPTEN_DIR / "make_libffi.sh"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue