Ë
    ñ�©jà  ã                  ó˜   — d dl mZ d dlZd dlZd dlZd dlZ ej                  e«      Z ej                  d«      Z
dd„Zd	d„Zdd„Zdd„Zy)
é    )ÚannotationsNz8include-system-site-packages\s*=\s*(?P<value>true|false)c                 ób   — t         j                  t        t         dt         j                  «      k7  S )znChecks if sys.base_prefix and sys.prefix match.

    This handles PEP 405 compliant virtual environments.
    Úbase_prefix)ÚsysÚprefixÚgetattr© ó    úe/var/www/html/streamforge-license/venv/lib/python3.12/site-packages/pip/_internal/utils/virtualenv.pyÚrunning_under_virtualenvr      s    € ô
 �:‰:œ¤ m´S·Z±ZÓ@Ñ@Ð@r
   c                 ó   — t         j                  j                  t        j                  d«      } 	 t        | d¬«      5 }|j                  «       j                  «       cddd«       S # 1 sw Y   yxY w# t        $ r Y yw xY w)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      sg   € ô
 —g‘g—l‘l¤3§:¡:¨|Ó<€Oðô �/¨GÔ4ð 	)¸Ø—6‘6“8×&Ñ&Ó(÷	)÷ 	)ò 	)ûäò Ùðús.   °A1 ½A%Á	A1 Á%A.Á*A1 Á.A1 Á1	A=Á<A=c                 ó²   — t        «       } | €t        j                  d«       y| D ]0  }t        j	                  |«      }|€Œ|j                  d«      dk(  sŒ0 y y)aZ  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.
    zŽ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#   %   sg   € ô &Ó'€IØÐô 	�‰ð#ô	
ð
 àò ˆÜ3×9Ñ9¸$Ó?ˆØÑ §¡¨WÓ!5¸Ó!@Ùðð r
   c                 ó,   — t        «       r
t        «       S y)zHReturns a boolean, whether running in venv with no system site-packages.F)r   r#   r	   r
   r   Úvirtualenv_no_globalr%   B   s   € äÔ!Ü$Ó&Ð&àr
   )ÚreturnÚbool)r&   zlist[str] | None)Ú
__future__r   Úloggingr   Úrer   Ú	getLoggerÚ__name__r   Úcompiler   r   r   r#   r%   r	   r
   r   ú<module>r.      sO   ðÝ "ã Û 	Û 	Û 
à	ˆ×	Ñ	˜8Ó	$€Ø&0 b§j¡jØ?ó'Ð #ó
Aóóô:r
   