hyb
2026-01-30 7657e1b2fa251a2ea372710ad75cb395a3c0e374
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Ë
ñúh ãó¸—ddlmZddlZddlZddlZddlZddlZeje«Z    ejd«Z d d„Z d d„Z d d„Zd d„Zd d„Zd d    „Zd d
„Zy) é)Ú annotationsNz8include-system-site-packages\s*=\s*(?P<value>true|false)cób—tjttdtj«k7S)znChecks if sys.base_prefix and sys.prefix match.
 
    This handles PEP 405 compliant virtual environments.
    Ú base_prefix)ÚsysÚprefixÚgetattr©óúQH:\Change_password\venv_build\Lib\site-packages\pip/_internal/utils/virtualenv.pyÚ_running_under_venvr s €ô
:‰:œ¤ m´S·Z±ZÓ@Ñ @Ð@r
có"—ttd«S)zmChecks if sys.real_prefix is set.
 
    This handles virtual environments created with pypa's virtualenv.
    Ú real_prefix)Úhasattrrr    r
r Ú _running_under_legacy_virtualenvrs€ô ”3˜ Ó &Ð&r
có.—t«xs
t«S)zDTrue if we're running inside a virtual environment, False otherwise.)r rr    r
r Úrunning_under_virtualenvr s€ä Ó  Ò FÔ$DÓ$FÐFr
có—tjjtjd«}    t |d¬«5}|j «j«cddd«S#1swYyxYw#t$rYywxYw)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%sg€ô
—g‘g—l‘l¤3§:¡:¨|Ó<€Oðô/¨GÔ 4ð    )¸Ø—6‘6“8×&Ñ&Ó(÷    )÷    )ò    )ûä òÙðús.° A1½A%Á    A1Á%A.Á*A1Á.A1Á1    A=Á<A=có²—t«}|€tjd«y|D]0}tj    |«}|€Œ|j d«dk(sŒ0yy)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.
    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)4sg€ô&Ó'€IØÐô    ‰ð #ô    
ð
àòˆÜ3×9Ñ9¸$Ó?ˆØ Ñ  §¡¨WÓ!5¸Ó!@Ùðð r
có—tjjtjjtj
««}tjj |d«}tjj|«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_virtualenvr2QsV€ô —7‘7—?‘?¤2§7¡7§?¡?´4·=±=Ó#AÓB€LÜ#%§7¡7§<¡<ØØ%ó$Рô 7‰7>‰>Ð6Ó 7Ð7r
cóT—t«r
t«St«r
t«Sy)zHReturns a boolean, whether running in venv with no system site-packages.F)r r)rr2r    r
r Úvirtualenv_no_globalr4_s%€ôÔÜ$Ó&Ð&ä'Ô)Ü1Ó3Ð3à r
)ÚreturnÚbool)r5zlist[str] | None)Ú
__future__rÚloggingrÚrer-rÚ    getLoggerÚ__name__r"Úcompiler$r rrrr)r2r4r    r
r ú<module>r=sbðÝ"ãÛ    Û    Û Û
à    ˆ×    Ñ    ˜8Ó    $€Ø&0 b§j¡jØ?ó'Ð#ó
Aó'óGó
óó: 8ô
r