Skip to content

Commit c65c9db

Browse files
authored
chore: bake macosx_11_0_x86_64 wheel (microsoft#317)
1 parent 1dba422 commit c65c9db

File tree

1 file changed

+17
-14
lines changed

1 file changed

+17
-14
lines changed

build_package.py

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -74,23 +74,26 @@
7474
os.stat(f"playwright/driver/{file}").st_mode | stat.S_IEXEC,
7575
)
7676

77-
wheel = ""
77+
wheels = []
7878
if platform == "mac":
79-
wheel = "macosx_10_13_x86_64.whl"
79+
wheels = ["macosx_10_13_x86_64.whl", "macosx_11_0_x86_64.whl"]
8080
if platform == "linux":
81-
wheel = "manylinux1_x86_64.whl"
81+
wheels = ["manylinux1_x86_64.whl"]
8282
if platform == "win32":
83-
wheel = "win32.whl"
83+
wheels = ["win32.whl"]
8484
if platform == "win32_x64":
85-
wheel = "win_amd64.whl"
86-
wheel_location = without_platform + wheel
87-
shutil.copy(base_wheel_location, wheel_location)
88-
with zipfile.ZipFile(wheel_location, "a") as zip:
89-
for file in os.listdir(f"driver/{platform}"):
90-
from_location = f"driver/{platform}/{file}"
91-
to_location = f"playwright/driver/{file}"
92-
if file == "playwright-cli" or file.startswith("ffmpeg"):
93-
os.chmod(from_location, os.stat(from_location).st_mode | stat.S_IEXEC)
94-
zip.write(from_location, to_location)
85+
wheels = ["win_amd64.whl"]
86+
for wheel in wheels:
87+
wheel_location = without_platform + wheel
88+
shutil.copy(base_wheel_location, wheel_location)
89+
with zipfile.ZipFile(wheel_location, "a") as zip:
90+
for file in os.listdir(f"driver/{platform}"):
91+
from_location = f"driver/{platform}/{file}"
92+
to_location = f"playwright/driver/{file}"
93+
if file == "playwright-cli" or file.startswith("ffmpeg"):
94+
os.chmod(
95+
from_location, os.stat(from_location).st_mode | stat.S_IEXEC
96+
)
97+
zip.write(from_location, to_location)
9598

9699
os.remove(base_wheel_location)

0 commit comments

Comments
 (0)