File tree 2 files changed +25
-1
lines changed
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 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
+ import glob
16
+ import os
15
17
import shutil
16
18
import subprocess
19
+ import zipfile
17
20
18
21
from playwright .path_utils import get_file_dirname
19
22
29
32
shutil .rmtree (_egg_dir )
30
33
31
34
subprocess .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