Skip to content

Commit 77847a9

Browse files
committed
fixup! Use zip instead of 7zip
1 parent 1515da7 commit 77847a9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

scripts/build.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,16 @@ def package_xswiftbus(self):
123123
os_map = {'Linux': 'linux', 'Darwin': 'macos', 'Windows': 'windows'}
124124
archive_name = '-'.join(['xswiftbus', os_map[platform.system()], self.word_size, self.version]) + '.zip'
125125
archive_path = path.abspath(path.join(os.pardir, archive_name))
126-
content_path = path.abspath(path.join(utils.get_swift_source_path(), 'dist', 'xswiftbus'))
127-
with zipfile.ZipFile(archive_path, 'w', compresslevel=9) as zip_file:
126+
base_path = path.abspath(path.join(utils.get_swift_source_path(), 'dist'))
127+
content_path = path.join(base_path, 'xswiftbus')
128+
with zipfile.ZipFile(archive_path, 'w', compression=zipfile.ZIP_DEFLATED, compresslevel=9) as zip_file:
128129
for root, dirs, files in os.walk(content_path):
129130
for file in files:
130131
if file.endswith(".debug") or file.endswith(".dSYM"):
131132
continue
132133
content_file_path = os.path.join(root, file)
133-
arcname = os.path.relpath(content_file_path, start="xswiftbus")
134-
zip_file.write(content_file_path, arcname, compresslevel=9)
134+
arcname = os.path.join(os.path.relpath(os.path.dirname(content_file_path), base_path), file)
135+
zip_file.write(content_file_path, arcname)
135136

136137
def symbols(self, upload_symbols):
137138
"""

0 commit comments

Comments
 (0)