HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/Python311/Lib/site-packages/pip/_internal/utils/__pycache__/virtualenv.cpython-311.pyc
�

�mi
���ddlmZddlZddlZddlZddlZddlZeje��Z	ej
d��Zdd�Zdd�Z
dd�Zdd
�Zdd�Zdd�Zdd
�ZdS)�)�annotationsNz8include-system-site-packages\s*=\s*(?P<value>true|false)�return�boolc�^�tjttdtj��kS)znChecks if sys.base_prefix and sys.prefix match.

    This handles PEP 405 compliant virtual environments.
    �base_prefix)�sys�prefix�getattr���@D:\Python311\Lib\site-packages\pip/_internal/utils/virtualenv.py�_running_under_venvrs��
�:���m�S�Z�@�@�@�@rc�,�ttd��S)zmChecks if sys.real_prefix is set.

    This handles virtual environments created with pypa's virtualenv.
    �real_prefix)�hasattrrrrr
� _running_under_legacy_virtualenvrs���3�
�&�&�&rc�:�t��p
t��S)zDTrue if we're running inside a virtual environment, False otherwise.)rrrrr
�running_under_virtualenvr s��� � �F�$D�$F�$F�Fr�list[str] | Nonec��tj�tjd��}	t|d���5}|������cddd��S#1swxYwYdS#t$rYdSwxYw)z�Reads {sys.prefix}/pyvenv.cfg and returns its contents as list of lines

    Returns None, if it could not read/access the file.
    z
pyvenv.cfgzutf-8)�encodingN)	�os�path�joinrr	�open�read�
splitlines�OSError)�pyvenv_cfg_file�fs  r
�_get_pyvenv_cfg_linesr!%s���
�g�l�l�3�:�|�<�<�O���/�G�
4�
4�
4�	)���6�6�8�8�&�&�(�(�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)�	)����	)�	)�	)�	)�	)�	)�������t�t����s4�A=�&A0�#A=�0A4�4A=�7A4�8A=�=
B�
Bc���t��}|�t�d��dS|D]:}t�|��}|�|�d��dkrdS�;dS)aZCheck `{sys.prefix}/pyvenv.cfg` for system site-packages inclusion

    PEP 405 specifies that when system site-packages are not supposed to be
    visible from a virtual environment, `pyvenv.cfg` must contain the following
    line:

        include-system-site-packages = false

    Additionally, log a warning if accessing the file fails.
    Nz�Could not access 'pyvenv.cfg' despite a virtual environment being active. Assuming global site-packages is not accessible in this environment.T�value�falseF)r!�logger�warning�#_INCLUDE_SYSTEM_SITE_PACKAGES_REGEX�match�group)�	cfg_lines�liner(s   r
�_no_global_under_venvr,4s���&�'�'�I���	���
#�	
�	
�	
�
�t�����3�9�9�$�?�?���	����W�!5�!5��!@�	��4�4���5rc��tj�tj�tj����}tj�|d��}tj�|��S)z�Check if "no-global-site-packages.txt" exists beside site.py

    This mirrors logic in pypa/virtualenv for determining whether system
    site-packages are visible in the virtual environment.
    zno-global-site-packages.txt)rr�dirname�abspath�site�__file__r�exists)�site_mod_dir�no_global_site_packages_files  r
�"_no_global_under_legacy_virtualenvr5QsZ���7�?�?�2�7�?�?�4�=�#A�#A�B�B�L�#%�7�<�<��%�$�$� ��7�>�>�6�7�7�7rc�v�t��rt��St��rt��SdS)zHReturns a boolean, whether running in venv with no system site-packages.F)rr,rr5rrr
�virtualenv_no_globalr7_s=�����'�$�&�&�&�'�)�)�4�1�3�3�3��5r)rr)rr)�
__future__r�loggingr�rer0r�	getLogger�__name__r%�compiler'rrrr!r,r5r7rrr
�<module>r>s��"�"�"�"�"�"�����	�	�	�	�	�	�	�	�����
�
�
�
�	��	�8�	$�	$��&0�b�j�?�'�'�#�
A�A�A�A�'�'�'�'�G�G�G�G�
��������:8�8�8�8�
�
�
�
�
�
r