nit: could be cleaned up a bit more
0diff --git a/contrib/macdeploy/gen-sdk b/contrib/macdeploy/gen-sdk
1index 0cfd2b1379..426d82e46c 100755
2--- a/contrib/macdeploy/gen-sdk
3+++ b/contrib/macdeploy/gen-sdk
4@@ -2,9 +2,7 @@
5 import argparse
6 import plistlib
7 import pathlib
8-import sys
9 import tarfile
10-import gzip
11 import os
12 import contextlib
13
14@@ -23,7 +21,7 @@ def run():
15 description=__doc__, formatter_class=argparse.RawTextHelpFormatter)
16
17 parser.add_argument('xcode_app', metavar='XCODEAPP', nargs=1)
18- parser.add_argument("-o", metavar='OUTSDKTGZ', nargs=1, dest='out_sdktgz', required=False)
19+ parser.add_argument("-o", metavar='OUTSDKTGZ', nargs=1, dest='out_sdkt', required=False)
20
21 args = parser.parse_args()
22
23@@ -47,11 +45,11 @@ def run():
24
25 out_name = "Xcode-{xcode_version}-{xcode_build_id}-extracted-SDK-with-libcxx-headers".format(xcode_version=xcode_version, xcode_build_id=xcode_build_id)
26
27- if args.out_sdktgz:
28- out_sdktgz_path = pathlib.Path(args.out_sdktgz_path)
29+ if args.out_sdkt:
30+ out_sdkt_path = pathlib.Path(args.out_sdkt_path)
31 else:
32- # Construct our own out_sdktgz if not specified on the command line
33- out_sdktgz_path = pathlib.Path("./{}.tar".format(out_name))
34+ # Construct our own out_sdkt if not specified on the command line
35+ out_sdkt_path = pathlib.Path("./{}.tar".format(out_name))
36
37 def tarfp_add_with_base_change(tarfp, dir_to_add, alt_base_dir):
38 """Add all files in dir_to_add to tarfp, but prepend alt_base_dir to the files'
39@@ -88,12 +86,12 @@ def run():
40 tarfp.add("./System/Library/Frameworks", recursive=True, filter=change_tarinfo_base)
41
42 print("Creating output .tar file...")
43- with out_sdktgz_path.open("wb") as fp:
44+ with out_sdkt_path.open("wb") as fp:
45 with tarfile.open(mode="w", fileobj=fp, format=tarfile.PAX_FORMAT) as tarfp:
46 print("Adding MacOSX SDK {} files...".format(sdk_version))
47 tarfp_add_with_base_change(tarfp, sdk_dir, out_name)
48 print("Done! Find the resulting tarball at:")
49- print(out_sdktgz_path.resolve())
50+ print(out_sdkt_path.resolve())
51
52 if __name__ == '__main__':
53 run()