File tree 2 files changed +17
-6
lines changed 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 18
18
19
19
from playwright ._impl ._driver import compute_driver_executable
20
20
21
- driver_executable = compute_driver_executable ()
22
- my_env = os .environ .copy ()
23
- # VSCode's JavaScript Debug Terminal provides it but driver/pkg does not support it
24
- my_env .pop ("NODE_OPTIONS" , None )
25
- my_env ["PW_CLI_TARGET_LANG" ] = "python"
26
- subprocess .run ([str (driver_executable ), * sys .argv [1 :]], env = my_env )
21
+
22
+ def main () -> None :
23
+ driver_executable = compute_driver_executable ()
24
+ my_env = os .environ .copy ()
25
+ # VSCode's JavaScript Debug Terminal provides it but driver/pkg does not support it
26
+ my_env .pop ("NODE_OPTIONS" , None )
27
+ my_env ["PW_CLI_TARGET_LANG" ] = "python"
28
+ subprocess .run ([str (driver_executable ), * sys .argv [1 :]], env = my_env )
29
+
30
+
31
+ if __name__ == "__main__" :
32
+ main ()
Original file line number Diff line number Diff line change @@ -135,4 +135,9 @@ def run(self) -> None:
135
135
"write_to_template" : 'version = "{version}"\n ' ,
136
136
},
137
137
setup_requires = ["setuptools_scm" ],
138
+ entry_points = {
139
+ "console_scripts" : [
140
+ "playwright=playwright.__main__:main" ,
141
+ ],
142
+ },
138
143
)
You can’t perform that action at this time.
0 commit comments