OwlCyberSecurity - MANAGER
Edit File: py_spec.cpython-312.pyc
� ˓�g� � �b � d Z ddlmZ ddlZddlZ ej d� Z G d� d� ZdgZy)zOA Python specification is an abstract requirement definition of an interpreter.� )�annotationsNzP^(?P<impl>[a-zA-Z]+)?(?P<version>[0-9.]+)?(?P<threaded>t)?(?:-(?P<arch>32|64))?$c �x � e Zd ZdZdd� d d�Zedd�� Zdd�Zed� � Z d� Z d d �Zy)� PythonSpecz2Contains specification about a Python Interpreter.N�� free_threadedc �t � || _ || _ || _ || _ || _ || _ || _ || _ y �N)�str_spec�implementation�major�minor�micror �architecture�path) �selfr r r r r r r r s �K/opt/hc_python/lib/python3.12/site-packages/virtualenv/discovery/py_spec.py�__init__zPythonSpec.__init__ s? � � !�� �,����� ��� ��� �*���(����� � c � � d\ }}}}}}}t j j |� r|}�nd} t j t |� } | r�d� } | j � }|d } | ��t d� | j d� D � � }t |� dkD rt �t |� dk( r|\ }}}nZt |� dk( r|\ }}nFt |� d k( r8|d }t t |� d � }|dkD rt t |� d d � }t |d � }d } |d }|dv rd } ||d � }| s|} | ||||||||�� S # t $ r Y �w xY w)N)NNNNNNNFc � � | �d S t | � S r ��int)�vals r �_int_or_nonez1PythonSpec.from_string_spec.<locals>._int_or_none- s � �#&�;�4�<�C��H�<r �versionc 3 �8 K � | ] }|s�t |� �� � y �wr r )�.0�is r � <genexpr>z.PythonSpec.from_string_spec.<locals>.<genexpr>4 s � �� �(Q�9K�A�q��Q��9K�s ���.� � � r � �threadedT�impl> �py�python�archr )�osr �isabs�re�match�PATTERN� groupdict�tuple�split�len� ValueErrorr �str�bool)�cls�string_specr&