Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/__pycache__/locations.cpython-35.pyc



“tÆ_Lã@s¸dZddlmZddlZddlZddlZddlZddlZddlZddl	mZ
ddlmZddlm
ZddlmZddlmZdd	lmZdd
lmZmZddlmZerddlmZmZmZmZdd
lm Z!ej"dƒZ#dd„Z$dd„Z%ej&dƒZ'ej(ƒj)ƒdkrve
j*ƒZ'yej+ƒZ,Wne-k
r£ej.Z,YnXerej/j0ej1dƒZ2ej/j0e,dƒZ3ej/j4e2ƒs~ej/j0ej1dƒZ2ej/j0e,dƒZ3neej/j0ej1dƒZ2ej/j0e,dƒZ3ejdd…dkr~ej1dd…dkr~dZ2ddddddd„Z5ddddddd „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ÚpipcCsdjtjŒ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ú†/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_internal/locations.pyÚget_major_minor_version"srcCsutƒr$tjjtjdƒ}nAytjjtjƒdƒ}Wntk
rdtjdƒYnXtjj	|ƒ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<||ƒ}|jƒd}	|jddd	ƒ}	|	dk	srt‚tt|	ƒ}
|oŠ|s¦td
j||ƒƒ‚|o¯|sËtdj||ƒƒ‚|p×|
j|
_|sé|ròd|
_	|pþ|
j	|
_	|p|
j
|
_
|p"|
j|
_|
jƒi}x%t
D]}t|
d
|ƒ||<q?Wd|jdƒkr—|jtd|
jd|
jƒƒtƒr&tjj|
j	dddjtƒƒ|ƒ|d<|dk	r&tjjtjj|dƒƒd}
tjj||
dd…ƒ|d<|S)z+
    Return a distutils install scheme
    r)ÚDistributionÚnamez
--no-user-cfgÚscript_argsNrÚcreateTzuser={} prefix={}zhome={} prefix={}ÚÚinstall_Úinstall_libr#Ú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/rrrrrÚ
splitdriver )Ú	dist_namer:r;r<Úisolatedrr)Ú	dist_argsÚdÚobjÚiÚschemeÚkeyÚ
path_no_driverrrÚdistutils_scheme_sL

%%	

"		
		rLcCsTt||||||ƒ}td|dd|dd|dd|dd|dƒ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)rLr)rCr:r;r<rDrrIrrrÚ
get_schemeŸs



rO)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>sX"	
2A
Back to Directory File Manager