o
    UhB                     @  sx   d dl mZ d dlZd dlZd dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ e d  ZG dd	 d	e
ZdS )
    )annotationsN)Path)Version)BaseProvider)PythonVersionWINDOWSc                   @  s(   e Zd ZdZed
ddZdddZd	S )WinregProviderz-A provider that finds Python from the winreg.returnt.Self | Nonec                 C  s   t sd S |  S )Nr   )cls r   o/var/www/html/construction_image-detection-poc/venv/lib/python3.10/site-packages/findpython/providers/winreg.pycreate   s   zWinregProvider.createt.Iterable[PythonVersion]c           	   	   c  s    ddl m} | }|D ]N}t|jdd }|d u rqzt|j}W n	 ty*   Y qw | rZt|jdd }d }|rJzt|}W n	 t	yI   Y nw | 
||t|jdt|}|V  qd S )Nr   )findallinstall_pathversionsys_architecture)findpython.pep514toolsr   getattrinfor   executable_pathAttributeErrorexistsr   
ValueErrorversion_makerSYS_ARCHITECTURE)	selfpep514_findallenv_versionsr   r   path
py_versionparse_versionpy_verr   r   r   find_pythons   s<   zWinregProvider.find_pythonsN)r
   r   )r
   r   )__name__
__module____qualname____doc__classmethodr   r%   r   r   r   r   r	      s
    r	   )
__future__r   platformtypingtpathlibr   packaging.versionr   findpython.providers.baser   findpython.pythonr   findpython.utilsr   architecturer   r	   r   r   r   r   <module>   s    