|
74 | 74 | os.stat(f"playwright/driver/{file}").st_mode | stat.S_IEXEC,
|
75 | 75 | )
|
76 | 76 |
|
77 |
| - wheel = "" |
| 77 | + wheels = [] |
78 | 78 | 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"] |
80 | 80 | if platform == "linux":
|
81 |
| - wheel = "manylinux1_x86_64.whl" |
| 81 | + wheels = ["manylinux1_x86_64.whl"] |
82 | 82 | if platform == "win32":
|
83 |
| - wheel = "win32.whl" |
| 83 | + wheels = ["win32.whl"] |
84 | 84 | 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) |
95 | 98 |
|
96 | 99 | os.remove(base_wheel_location)
|
0 commit comments