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/binFcCs†ddlm}i}|r ddgi}ni}d|i} |  |¡|| ƒ} |  ¡| jddd} | d k s`t‚|rx|rxtd  ||¡ƒ‚|r|rtd  ||¡ƒ‚|p˜| j| _|s¤|rªd | _|p²| j| _|p¾| j | _ |pÊ| j | _ |   ¡t D]} t | d | ƒ|| <qÚd|  d¡kr| t| j| jd¡tƒr‚tj tjddd tƒ¡|¡|d<|d k r‚tj tj |d¡¡d} tj || dd …¡|d<|S)z+ Return a distutils install scheme r)Ú DistributionZ script_argsz --no-user-cfgÚnameZinstallT)ZcreateNzuser={} prefix={}zhome={} prefix={}ÚZinstall_Ú install_lib)rZplatlibZincludeÚsitezpython{}Zheadersé)Zdistutils.distr#ÚupdateZparse_config_filesZget_command_objÚAssertionErrorrÚuserrÚhomeÚrootZfinalize_optionsrÚgetattrZget_option_dictÚdictr&rrrrrrÚ splitdriver)Z dist_namer+r,r-Úisolatedrr#ZschemeZextra_dist_argsZ dist_argsÚdÚiÚkeyZ path_no_driverrrÚdistutils_scheme[sV          û ÿÿ þr5)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Úexistsr5rrrrÚsN            (ÿ