\hydZ edjddlZddlZddlZddlm Z ddl m Z ddl m ZddlmZddlmZmZmZmZmZdd lmZdd lmZdd lmZd d lmZej>e Z! dddde"de#dee"dee"de#dee"de#dee"e"ffdZ$ dde"de#dee"dee"de#dee"defdZ%de"fdZ&de"fdZ'de"fdZ(y#eef$rYwxYw)z7Locations where we look for configs, install stuff, etc_distutils_hackN)Command) SCHEME_KEYS)installget_python_lib)DictListOptionalUnioncast)Scheme)WINDOWS)running_under_virtualenv)get_major_minor_versionF)ignore_config_files dist_nameuserhomerootisolatedprefixrreturncddlm}d|i}|rdg|d<||} |s | jd } | jd d } | Jtt| } |r|r Jd |d||r|r Jd|d||xs | j| _ |s|rd| _ |xs | j| _ |xs | j| _ |xs | j| _| ji} t D]}t#| d|z| |<d| j%d vr(| j'| j(| j(dt+r|r|}n|r | j,}n | j}t.j0j|dddt3|| d<|ht.j0j5t.j0j7| dd}t.j0j||dd | d<| S#t$r@| j } t j ddjd| DY#wxYw)z+ Return a distutils install scheme r) Distributionnamez --no-user-cfg script_argsz6Ignore distutils configs in %s due to encoding errors.z, c3ZK|]#}tjj|%yw)N)ospathbasename).0ps e/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pip/_internal/locations/_distutils.py z#distutils_scheme..>s=!"''**1-=s)+NrT)createzuser=z prefix=zhome=install_ install_lib)purelibplatlibincludesitepythonheadersr)distutils.distrparse_config_filesUnicodeDecodeErrorfind_config_filesloggerwarningjoinget_command_objr distutils_install_commandrrrrfinalize_optionsrgetattrget_option_dictupdater*rinstall_userbaser r!r splitdriveabspath)rrrrrrrr dist_argsdpathsobjischemekey path_no_drives r%distutils_schemerI#sK,3992EI$3#4 - YA   "'+C  Id  3C ?? &,A@E$xx"@@ @E$xx"@@ ^QVVAF t!AH ^QVVAF ^QVVAF F3ac!12s 3)))44 !--AMMJK! F ''FXXFGGLL   ,./ 0   y  GG..rwwvi?P/QRSTUM " T=3D EF9  Mm" '')E NNH =u==  sH AIIc`t||||||}t|d|d|d|d|dS)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 r,r+r0scriptsdata)r,r+r0rKrL)rIr)rrrrrrrFs r% get_schemerMssL2itT8V LF y!y!y!y! F^  ctjjtj}t ratjj |d}tjj|s tjj |d}|Stjdddk(r |dddk(rytjj |dS)NScriptsbindarwinz/System/Library/z/usr/local/bin) r r!normpathsysrrr7existsplatform)rbin_pys r%get_bin_prefixrZsWW  cjj )Ffi0ww~~f%WW\\&%0F  ||BQ8#s 7I(I 77<< &&rNctdS)NF plat_specificrrNr% get_purelibr_s  ..rNctdS)NTr\rr^rNr% get_platlibras  --rN)FNNFN))__doc__ __import__ remove_shim ImportErrorAttributeErrorloggingr rV distutils.cmdrDistutilsCommanddistutils.command.installrrr9distutils.sysconfigrtypingr r r r r pip._internal.models.schemerpip._internal.utils.compatrpip._internal.utils.virtualenvrbaser getLogger__name__r5strboolrIrMrZr_rar^rNr%rus=  !--/ 51J.44..C)   8 $  M!&MM M 3-M 3- M  M SM MM #s(^Md     3-  3-    SM   F''"/S/.S.{ ^$  sCCC