(zip_name: str)
| 105 | |
| 106 | |
| 107 | def ensure_driver_bundle(zip_name: str) -> None: |
| 108 | destination_path = f"driver/playwright-{driver_version}-{zip_name}.zip" |
| 109 | if os.path.exists(destination_path): |
| 110 | return |
| 111 | # Assemble this platform's bundle by downloading the playwright-core npm |
| 112 | # package and the matching Node.js binary. Only the requested platform is |
| 113 | # built, so a wheel build downloads just the one Node.js binary it needs. |
| 114 | build_script = os.path.join(os.path.dirname(__file__), "scripts", "build_driver.py") |
| 115 | subprocess.check_call([sys.executable, build_script, zip_name]) |
| 116 | if not os.path.exists(destination_path): |
| 117 | raise RuntimeError( |
| 118 | f"Driver bundle {destination_path} was not produced by scripts/build_driver.py." |
| 119 | ) |
| 120 | |
| 121 | |
| 122 | class PlaywrightBDistWheelCommand(BDistWheelCommand): |
no outgoing calls
no test coverage detected