U n aN@sdZddlmZddlZddlZddlZddlZddlZddlZddl mZ ddl m Z ddl m ZddlmZddlmZdd lmZdd lmZmZdd lmZerdd lmZmZmZmZdd lm Z!e"dZ#ddZ$ddZ%e&dZ'e()dkr e *Z'z e+Z,Wne-k r2ej.Z,YnXerej/0ej1dZ2ej/0e,dZ3ej/4e2sej/0ej1dZ2ej/0e,dZ3nJej/0ej1dZ2ej/0e,dZ3ejdddkrej1dddkrdZ2d!ddZ5d"dd Z6dS)#z7Locations where we look for configs, install stuff, etc)absolute_importN) sysconfig) SCHEME_KEYS)install)Scheme)appdirs)WINDOWS)MYPY_CHECK_RUNNINGcast)running_under_virtualenv)DictListOptionalUnion)CommandpipcCs djtjS)ze Return the major-minor version of the current Python as a string, e.g. "3.7" or "3.10". z{}.{})formatsys version_inforrXC:\Users\vtejo\AppData\Local\Temp\pip-unpacked-wheel-6mt8ur68\pip\_internal\locations.pyget_major_minor_version"srcCsZtrtjtjd}n6ztjtd}Wntk rLtdYnXtj |S)Nsrcz=The folder you are executing pip from can no longer be found.) r ospathjoinrprefixgetcwdOSErrorexitabspath) src_prefixrrrget_src_prefix+s r"purelibpypyZScriptsbindarwinz/System/Library/z/usr/local/binFcCsddlm}d|i}|r"dg|d<||}|d} |jddd } | dk sPttt| } |rr|rrtd |||r|rtd |||p| j| _|s|rd | _ |p| j | _ |p| j | _ |p| j | _ | i} t D]} t| d | | | <qd|dkr| t| j| jdtrtjtj dddt|| d<|dk rtjtj| dd} tj|| dd| d<| S)z+ Return a distutils install scheme r) Distributionnamez --no-user-cfg script_argsNrT)createzuser={} prefix={}zhome={} prefix={}install_ install_lib)r#platlibincludesitezpython{}headers)distutils.distr)parse_config_filesget_command_objAssertionErrorr distutils_install_commandruserrhomerootfinalize_optionsrgetattrget_option_dictupdatedictr/r rrrrr splitdriver ) dist_namer:r;r<isolatedrr) dist_argsdobjischemekey path_no_driverrrdistutils_scheme_sV           rLcCs8t||||||}t|d|d|d|d|ddS)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#r3scriptsdata)r0r#r3rMrN)rLr)rCr:r;r<rDrrIrrr get_schemesrO)FNNFN)FNNFN)7__doc__ __future__rros.pathplatformr2rr distutilsdistutils_sysconfigdistutils.command.installrrr9pip._internal.models.schemerZpip._internal.utilsrpip._internal.utils.compatrpip._internal.utils.typingr r pip._internal.utils.virtualenvr typingr r rr distutils.cmdrZDistutilsCommanduser_cache_dirUSER_CACHE_DIRrr"get_path site_packagespython_implementationlowerget_python_libgetusersitepackages user_siteAttributeError USER_SITErrrbin_pybin_userexistsrLrOrrrrsd              ( B