o
    %hw                     @   sl   d dl Z d dlZd dlZd dlmZ d dlmZ d dlZd dlm	Z	 dee
e
f fddZdefdd	ZdS )
    N)Path)Tuple)versionreturnc                  C   s^   t ttjd } t| d d }tjdkr#t	dt| d |fS t	dt| d |fS )Ndriverpackagezcli.jswin32PLAYWRIGHT_NODEJS_PATHznode.exenode)
r   inspectgetfile
playwrightparentstrsysplatformosgetenv)driver_pathcli_path r   L/var/www/html/myenv/lib/python3.10/site-packages/playwright/_impl/_driver.pycompute_driver_executable   s   
r   c                  C   s8   t j } d| d< tjj dtjj | d< t| d< | S )NpythonPW_LANG_NAME.PW_LANG_NAME_VERSIONPW_CLI_DISPLAY_VERSION)r   environcopyr   version_infomajorminorr   )envr   r   r   get_driver_env$   s
   
r$   )r   r   r   pathlibr   typingr   r   playwright._repo_versionr   r   r   dictr$   r   r   r   r   <module>   s   