File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1- recursive-include playwright/drivers *
1+ include playwright/drivers/browsers.json
2+ include playwright/*.py
3+ include README.md
4+ include SECURITY.md
5+ include LICENSE
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ import glob
16+ import os
1517import shutil
1618import subprocess
19+ import zipfile
1720
1821from playwright .path_utils import get_file_dirname
1922
2932 shutil .rmtree (_egg_dir )
3033
3134subprocess .run ("python setup.py sdist bdist_wheel" , shell = True )
35+
36+ base_wheel_location = glob .glob ("dist/*.whl" )[0 ]
37+ without_platform = base_wheel_location [:- 7 ]
38+
39+ pack_data = [
40+ ("driver-linux" , "manylinux1_x86_64.whl" ),
41+ ("driver-macos" , "macosx_10_13_x86_64.whl" ),
42+ ("driver-win.exe" , "win_amd64.whl" ),
43+ ]
44+
45+ for driver , wheel in pack_data :
46+ wheel_location = without_platform + wheel
47+ shutil .copy (base_wheel_location , wheel_location )
48+ with zipfile .ZipFile (wheel_location , "a" ) as zipf :
49+ driver_location = f"playwright/drivers/{ driver } .gz"
50+ zipf .write (driver_location , driver_location )
51+ os .remove (base_wheel_location )
You can’t perform that action at this time.
0 commit comments