RedZddlZddlZddlZddlmZddlmZddlm Z ddl m Z ddl mZmZmZmZmZmZddlmZdd lmZdd lmZd d lmZejeZ dd ddede dedede dede deeeffdZ! ddede deedeede deedefdZ"defdZ#defdZ$defdZ%dedeeeffdZ&dS)z7Locations where we look for configs, install stuff, etcN)Command) SCHEME_KEYS)installget_python_lib)DictListOptionalTupleUnioncast)Scheme)WINDOWS)running_under_virtualenv)get_major_minor_versionF)ignore_config_files dist_nameuserhomerootisolatedprefixrreturncddlm}d|i}|rdg|d<||} |sr | n\#t$rO| } t ddd| DYnwxYwd } | d d } | Jtt| } |r|rJd |d||r|rJd|d||p| j | _ |s|rd| _ |p| j | _ |p| j | _ |p| j| _| i} t D]}t#| d|z| |<d| d vr.| t)| j| jt-r|r|}n|r| j}n| j }t0j|dddt5|| d<|st0jt0j| dd}t0j||dd | d<| S)z+ Return a distutils install scheme r) Distributionnamez --no-user-cfg script_argsz6Ignore distutils configs in %s due to encoding errors.z, c3TK|]#}tj|V$dS)N)ospathbasename).0ps /builddir/build/BUILDROOT/alt-python311-pip-21.3.1-3.el8.x86_64/opt/alt/python311/lib/python3.11/site-packages/pip/_internal/locations/_distutils.py z#distutils_scheme..4s2==!"'**1--======NrT)createzuser=z prefix=zhome=install_ install_lib)purelibplatlibincludesitepythonheadersr)distutils.distrparse_config_filesUnicodeDecodeErrorfind_config_filesloggerwarningjoinget_command_objr distutils_install_commandrrrrfinalize_optionsrgetattrget_option_dictupdatedictr+rinstall_userbaser r!r splitdriveabspath)rrrrrrrr dist_argsdpathsobjischemekey path_no_drives r%distutils_schemerKs,+++++3992EI5$3#4 -  YA    " " " "!   ''))E NNH ==u=====      '+C  Id  3 3C ??? &,,A@@@"@$"@"@"@"@@@@@@@"@$"@"@"@"@@@@ ^QVAF t!AH ^QVAF ^QVAF F33ac!122s )))4444 d1=!-HHHIII!!F  FF  'FFXFGLL    0,.. 0 0    y  G..rwvi?P/Q/QRRSTUM " T=3D E EF9  Ms6ABBct||||||}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,r1scriptsdata)r-r,r1rMrN)rKr)rrrrrrrHs r% get_schemerOisY2itT8V L LF y!y!y!y! F^    r'ctjtj}t ratj|d}tj|s tj|d}|Stjdddkr|dddkrdStj|dS)NScriptsbindarwinz/System/Library/z/usr/local/bin) r r!normpathsysrrr8existsplatform)rbin_pys r%get_bin_prefixr[sW  cj ) )Ffi00w~~f%% 1W\\&%00F  |BQB8##ss 7I(I(I 7<< & &&r'c"tdS)NF plat_specificrr'r% get_purelibr`s  . . ..r'c"tdS)NTr]rr_r'r% get_platlibrbs  - - --r'cFtd|td|fS)NF)r^rTr)rs r%get_prefixed_libsrds,U6:::T&999 r')FNNFN)'__doc__loggingr rW distutils.cmdrDistutilsCommanddistutils.command.installrrr:distutils.sysconfigrtypingrr r r r r pip._internal.models.schemerpip._internal.utils.compatrpip._internal.utils.virtualenvrbaser getLogger__name__r6strboolrKrOr[r`rbrdr_r'r%rts==  555555111111JJJJJJ......;;;;;;;;;;;;;;;;............CCCCCC))))))  8 $ $  N!&NNNN N N  N  N  NN #s(^NNNNf      3-  3-    SM      F'''''"/S////.S....ceCHor'