+
    <j                         ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIHtHt ] P                  ! ]	4      t
]P                  ! R4      tR R ltR R ltR R	 ltR
 R ltR R ltR R ltR R ltR# )    N)ListOptionalz8include-system-site-packages\s*=\s*(?P<value>true|false)c                $    V ^8  d   QhR\         /#    returnbool)formats   "S/opt/headortail/venv/lib/python3.14/site-packages/pip/_internal/utils/virtualenv.py__annotate__r      s     A AT A    c                 b    \         P                  \        \         R\         P                  4      8g  # )zfChecks if sys.base_prefix and sys.prefix match.

This handles PEP 405 compliant virtual environments.
base_prefix)sysprefixgetattr r   r   _running_under_venvr      s     
 ::mSZZ@@@r   c                $    V ^8  d   QhR\         /# r   r	   )r   s   "r   r   r      s     ' '$ 'r   c                 "    \        \        R4      # )zeChecks if sys.real_prefix is set.

This handles virtual environments created with pypa's virtualenv.
real_prefix)hasattrr   r   r   r    _running_under_legacy_virtualenvr      s     3&&r   c                $    V ^8  d   QhR\         /# r   r	   )r   s   "r   r   r      s     G G$ Gr   c                 :    \        4       ;'       g    \        4       # )zDTrue if we're running inside a virtual environment, False otherwise.)r   r   r   r   r   running_under_virtualenvr      s     FF$D$FFr   c                P    V ^8  d   QhR\         \        \        ,          ,          /# r   )r   r   str)r   s   "r   r   r   $   s      xS	2 r   c                 (   \         P                  P                  \        P                  R4      p  \        V RR7      ;_uu_ 4       pVP                  4       P                  4       uuRRR4       #   + '       g   i     R# ; i  \         d     R# i ; i)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.cfgzutf-8)encodingN)	ospathjoinr   r   openread
splitlinesOSError)pyvenv_cfg_filefs     r   _get_pyvenv_cfg_linesr+   $   sd    
 ggll3::|<O /G44668&&( 5444 s/   B A.#
B .A?	9B ?B BBc                $    V ^8  d   QhR\         /# r   r	   )r   s   "r   r   r   3   s      t r   c                     \        4       p V f   \        P                  R4       R# V  F7  p\        P	                  V4      pVf   K  VP                  R4      R8X  g   K6   R# 	  R# )aB  Check `{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.
zCould 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liner3   s      r   _no_global_under_venvr7   3   sb     &'I 	#	

 399$?W!5!@  r   c                $    V ^8  d   QhR\         /# r   r	   )r   s   "r   r   r   P   s     8 8D 8r   c                    \         P                  P                  \         P                  P                  \        P
                  4      4      p \         P                  P                  V R4      p\         P                  P                  V4      # )zCheck 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.
zno-global-site-packages.txt)r"   r#   dirnameabspathsite__file__r$   exists)site_mod_dirno_global_site_packages_files     r   "_no_global_under_legacy_virtualenvrA   P   sV     77??277??4==#ABL#%77<<%$  77>>677r   c                $    V ^8  d   QhR\         /# r   r	   )r   s   "r   r   r   ^   s     
 
d 
r   c                 n    \        4       '       d   \        4       # \        4       '       d   \        4       # R# )zHReturns a boolean, whether running in venv with no system site-packages.F)r   r7   r   rA   r   r   r   virtualenv_no_globalrD   ^   s+     $&&'))133r   )loggingr"   rer<   r   typingr   r   	getLogger__name__r0   compiler2   r   r   r   r+   r7   rA   rD   r   r   r   <module>rK      s^     	 	  
 !			8	$&(jj?' #
A'G
:8
r   