\hddlZddlZddlZddlZddlZddlmZmZddlm Z m Z ddl m Z ddl mZmZmZej"eZeej*ZeeddZdefd Zdefd Zdefd Zdefd Zgd Zej@dejCd ddededejDedejDededejDede fdZ#defdZ$defdZ%defdZ&y)N)InvalidSchemeCombinationUserInstallationInvalid) SCHEME_KEYSScheme)running_under_virtualenv) change_rootget_major_minor_versionis_osx_frameworkget_preferred_schemereturncDdtvxrt xr tS)aCheck for Apple's ``osx_framework_library`` scheme. Python distributed by Apple's Command Line Tools has this special scheme that's used when: * This is a framework build. * We are installing into the system prefix. This does not account for ``pip install --prefix`` (also means we're not installing to the system prefix), which should use ``posix_prefix``, but logic here means ``_infer_prefix()`` outputs ``osx_framework_library``. But since ``prefix`` is not available for ``sysconfig.get_default_scheme()``, which is the stdlib replacement for ``_infer_prefix()``, presumably Apple wouldn't be able to magically switch between ``osx_framework_library`` and ``posix_prefix``. ``_infer_prefix()`` returning ``osx_framework_library`` means its behavior is consistent whether we use the stdlib implementation or our own, and we deal with this special case in ``get_scheme()`` instead. osx_framework_library)_AVAILABLE_SCHEMESrr e/root/niggaflix-v3/playground/venv/lib/python3.12/site-packages/pip/_internal/locations/_sysconfig.py _should_use_osx_framework_prefixrs+( #55 (* *   rctr tdStrytjjdt j}|t vr|Stjjt vrtjjSt jd}|t vr|St jt vrt jSy)a!Try to find a prefix scheme for the current platform. This tries: * A special ``osx_framework_library`` for Python distributed by Apple's Command Line Tools, when not running in a virtual environment. * Implementation + OS, used by PyPy on Windows (``pypy_nt``). * Implementation without OS, used by PyPy on POSIX (``pypy``). * OS + "prefix", used by CPython on POSIX (``posix_prefix``). * Just the OS name, used by CPython on Windows (``nt``). If none of the above works, fall back to ``posix_prefix``. prefixr__prefix posix_prefix)_PREFERRED_SCHEME_APIrsysimplementationnameosr)implementation_suffixedsuffixeds r _infer_prefixr!7s$X..')&!$!3!3!8!8 9277)D"44&& "44!!&&&'''"H%% ww$$ww rctr tdStr tsd}ntjd}|t vr|Sdt vr t y)z3Try to find a user scheme for the current platform.userosx_framework_user_user posix_user)rr rrrrrr s r _infer_userr(VsT$V,,":"<'ggYe$%%--%'' rc`tr tdStjd}|tvr|Sy)z,Try to find a home for the current platform.home_home posix_home)rrrrr's r _infer_homer-es1$V,,''% H%% r)installed_basebaseinstalled_platbaseplatbaser exec_prefixuserbase dist_namer#r*rootisolatedrc$|r|r tdd|r|r tdd| t}n|r t}n t}||dk(rd}|tDcic]}||}}n|tDcic]}||}}ni}t j ||} trv|r!|jdtj} n |jdtj} d t} tjj| d d | | d <n|sd }t| d | dtjj| d || d| d} |.t D]%} t#|t%| | }t'| | |'| Scc}wcc}w)a\ Get the "scheme" corresponding to the input parameters. :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 :param root: root under which other directories are re-based :param isolated: ignored, but kept for distutils compatibility (where this controls whether the user-site pydistutils.cfg is honored) :param prefix: indicates to use the "prefix" scheme and provides the base directory for the same z--userz--prefixz--homerr)schemevarsr3r/pythonincludesiteUNKNOWNplatlibpurelibscriptsdata)r>r?headersr@rA)rr-r(r! _HOME_KEYS sysconfig get_pathsrgetrrr rpathjoinrrr getattrsetattr)r4r#r*r5r6r scheme_namek variablespathsr/ python_xyr8keyvalues r get_schemerR|s* &x<< &x<< !m !m #o k-DD$  &01QW1 1  (231QY3 3   { CE ! ==SZZ8D==4D4678 77<<iKi  i i  U9-y9i 6] F  (Cgfc&:;E FC ' ( ME23s  F/ F ctjdddk(rtjdddk(rytjdS)Ndarwinz/System/Library/z/usr/local/binr@)rplatformrrDrErrrget_bin_prefixrXs> ||BQ8# 3B;M(M     ++rc0tjdS)Nr?rDrErrr get_purelibr[     ++rc0tjdS)Nr>rZrrr get_platlibr^r\r)FNNFN)'loggingrrrDtypingpip._internal.exceptionsrrpip._internal.models.schemerrpip._internal.utils.virtualenvrr/r r r getLogger__name__loggersetget_scheme_namesrrIrboolrstrr!r(r-rCget_config_varappendOptionalrRrXr[r^rrrrnsX  V;CHH   8 $33356 +A4H$4s> S S 9J'3j! !%!%#' JJ J //# J //#  J  J OOC J JZ,,,S,,S,r