mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-05 10:12:48 +01:00
contrib: Specify wb mode when creating mac sdk
Fix the warning: ``` ./contrib/macdeploy/gen-sdk:84: FutureWarning: GzipFile was opened for writing, but this will change in future Python releases. Specify the mode argument for opening it for writing. ```
This commit is contained in:
@@ -81,7 +81,7 @@ def run():
|
|||||||
|
|
||||||
print("Creating output .tar.gz file...")
|
print("Creating output .tar.gz file...")
|
||||||
with out_sdktgz_path.open("wb") as fp:
|
with out_sdktgz_path.open("wb") as fp:
|
||||||
with gzip.GzipFile(fileobj=fp, compresslevel=9, mtime=0) as gzf:
|
with gzip.GzipFile(fileobj=fp, mode='wb', compresslevel=9, mtime=0) as gzf:
|
||||||
with tarfile.open(mode="w", fileobj=gzf) as tarfp:
|
with tarfile.open(mode="w", fileobj=gzf) as tarfp:
|
||||||
print("Adding MacOSX SDK {} files...".format(sdk_version))
|
print("Adding MacOSX SDK {} files...".format(sdk_version))
|
||||||
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
|
tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
|
||||||
|
|||||||
Reference in New Issue
Block a user