zmc
2023-12-22 9fdbf60165db0400c2e8e6be2dc6e88138ac719a
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
52
53
54
55
56
57
58
59
60
61
62
63
U
H=®dLã@sèdZddlmZddlZddlZddlZddlZddlZddlZddl    mZ
ddl m Z ddl m ZddlmZddlmZdd    lmZdd
lmZmZdd lmZerÌdd lmZmZmZmZdd lm Z!e "d¡Z#dd„Z$dd„Z%e &d¡Z'e (¡ )¡dkr
e
 *¡Z'z e +¡Z,Wne-k
r2ej.Z,YnXer†ej/ 0ej1d¡Z2ej/ 0e,d¡Z3ej/ 4e2¡sÐej/ 0ej1d¡Z2ej/ 0e,d¡Z3nJej/ 0ej1d¡Z2ej/ 0e,d¡Z3ejdd…dkrÐej1dd…dkrÐdZ2d!dd„Z5d"dd „Z6dS)#z7Locations where we look for configs, install stuff, etcé)Úabsolute_importN)Ú    sysconfig)Ú SCHEME_KEYS)Úinstall)ÚScheme)Úappdirs)ÚWINDOWS)ÚMYPY_CHECK_RUNNINGÚcast)Úrunning_under_virtualenv)ÚDictÚListÚOptionalÚUnion)ÚCommandÚpipcCs djtjŽS)ze
    Return the major-minor version of the current Python as a string, e.g.
    "3.7" or "3.10".
    z{}.{})ÚformatÚsysÚ version_info©rrúND:\z\workplace\VsCode\pyvenv\venv\Lib\site-packages\pip/_internal/locations.pyÚget_major_minor_version"srcCsZtƒrtj tjd¡}n6ztj t ¡d¡}Wntk
rLt d¡YnXtj     |¡S)NÚsrcz=The folder you are executing pip from can no longer be found.)
r ÚosÚpathÚjoinrÚprefixÚgetcwdÚOSErrorÚexitÚabspath)Ú
src_prefixrrrÚget_src_prefix+sÿ
r"ÚpurelibÚpypyZScriptsÚbinéÚdarwinéz/System/Library/z/usr/local/binFcCs„ddlm}d|i}|r"dg|d<||ƒ}| ¡d}    |jddd    }    |    dk    sPt‚tt|    ƒ}
|rr|rrtd
 ||¡ƒ‚|rŠ|rŠtd  ||¡ƒ‚|p’|
j|
_|sž|r¤d |
_    |p¬|
j    |
_    |p¸|
j
|
_
|pÄ|
j |
_ |
  ¡i} t D]} t|
d | ƒ| | <qØd| d¡kr|  t|
j|
jd¡tƒr€tj |
j    ddd tƒ¡|¡| d<|dk    r€tj tj | d¡¡d} tj || dd…¡| d<| S)z+
    Return a distutils install scheme
    r)Ú DistributionÚnamez --no-user-cfgÚ script_argsNrT)Úcreatezuser={} prefix={}zhome={} prefix={}ÚÚinstall_Ú install_lib)r#ÚplatlibÚincludeÚsitezpython{}Úheadersé)Údistutils.distr)Úparse_config_filesÚget_command_objÚAssertionErrorr
Údistutils_install_commandrÚuserrÚhomeÚrootÚfinalize_optionsrÚgetattrÚget_option_dictÚupdateÚdictr/r rrrrÚ
splitdriver )Ú    dist_namer:r;r<Úisolatedrr)Ú    dist_argsÚdÚobjÚiÚschemeÚkeyÚ path_no_driverrrÚdistutils_scheme_sV 
 
 
û
ÿÿ
þrLcCs8t||||||ƒ}t|d|d|d|d|ddS)a;
    Get the "scheme" corresponding to the input parameters. The distutils
    documentation provides the context for the available schemes:
    https://docs.python.org/3/install/index.html#alternate-installation
 
    :param dist_name: the name of the package to retrieve the scheme for, used
        in the headers scheme path
    :param user: indicates to use the "user" scheme
    :param home: indicates to use the "home" scheme and provides the base
        directory for the same
    :param root: root under which other directories are re-based
    :param isolated: equivalent to --no-user-cfg, i.e. do not consider
        ~/.pydistutils.cfg (posix) or ~/pydistutils.cfg (non-posix) for
        scheme paths
    :param prefix: indicates to use the "prefix" scheme and provides the
        base directory for the same
    r0r#r3ÚscriptsÚdata)r0r#r3rMrN)rLr)rCr:r;r<rDrrIrrrÚ
get_schemeŸsÿûrO)FNNFN)FNNFN)7Ú__doc__Ú
__future__rrÚos.pathÚplatformr2rrÚ    distutilsÚdistutils_sysconfigÚdistutils.command.installrrr9Úpip._internal.models.schemerZpip._internal.utilsrÚpip._internal.utils.compatrÚpip._internal.utils.typingr    r
Úpip._internal.utils.virtualenvr Útypingr r rrÚ distutils.cmdrZDistutilsCommandÚuser_cache_dirÚUSER_CACHE_DIRrr"Úget_pathÚ site_packagesÚpython_implementationÚlowerÚget_python_libÚgetusersitepackagesÚ    user_siteÚAttributeErrorÚ    USER_SITErrrÚbin_pyÚbin_userÚexistsrLrOrrrrÚ<module>sd         
    
  (ÿ
Bú