U ÀÒ.e&ã@s¸dZddlmZddlZddlZddlZddlZddlZddlZddl mZ ddl m Z ddl mZddlmZddlmZdd lmZer¨dd lmZmZmZmZmZe d ¡Zd d „Zdd„Ze d¡Z e !¡ "¡dkräe  #¡Z z e $¡Z%Wne&k r ej'Z%YnXer`ej( )ej*d¡Z+ej( )e%d¡Z,ej( -e+¡sªej( )ej*d¡Z+ej( )e%d¡Z,nJej( )ej*d¡Z+ej( )e%d¡Z,ejdd…dkrªej*dd…dkrªdZ+ddd„Z.dS)z7Locations where we look for configs, install stuff, etcé)Úabsolute_importN)Ú sysconfig)Ú SCHEME_KEYS)Úappdirs)ÚWINDOWS)ÚMYPY_CHECK_RUNNING)Úrunning_under_virtualenv)ÚAnyÚUnionÚDictÚListÚOptionalZpipcCs 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ú;/usr/lib/python3.8/site-packages/pip/_internal/locations.pyÚget_major_minor_versionsrcCsZtƒ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)Z src_prefixrrrÚget_src_prefix(sÿ rÚpurelibZpypyZScriptsÚbinéÚdarwinéz/System/Library/z/usr/local/binFcCsHddlm}i}|r ddgi}ni}d|i} |  |¡|| ƒ} |  ¡| jddd} |p\| j| _|sh|rnd | _|pv| j| _|p‚| j| _|pŽ| j| _|   ¡t D]} t | d | ƒ|| <qžd |   d¡krÚ| t | j| jd ¡tƒrDtj tjd dd tƒ¡|¡|d<|dk rDtj tj |d¡¡d} tj || dd…¡|d<|S)z+ Return a distutils install scheme r)Ú DistributionZ script_argsz --no-user-cfgÚnameZinstallT)ZcreateÚZinstall_Ú install_lib)rZplatlibZincludeÚsitezpython{}ZheadersNé)Zdistutils.distr#ÚupdateZparse_config_filesZget_command_objÚuserrÚhomeÚrootZfinalize_optionsrÚgetattrZget_option_dictÚdictr&rrrrrrrÚ splitdriver)Z dist_namer*r+r,Úisolatedrr#ZschemeZextra_dist_argsZ dist_argsÚdÚiÚkeyZ path_no_driverrrÚdistutils_scheme[sP         û ÿÿ þr4)FNNFN)/Ú__doc__Z __future__rrZos.pathÚplatformr'rrZ distutilsZdistutils_sysconfigZdistutils.command.installrZpip._internal.utilsrZpip._internal.utils.compatrZpip._internal.utils.typingrZpip._internal.utils.virtualenvrÚtypingr r r r r Zuser_cache_dirZUSER_CACHE_DIRrrZget_pathZ site_packagesZpython_implementationÚlowerZget_python_libÚgetusersitepackagesÚ user_siteÚAttributeErrorÚ USER_SITErrrZbin_pyZbin_userÚexistsr4rrrrÚsN            (ÿ