§
    
Á³g   ã                   óð  — d dl Z d dlZd dlZd dlZd dlZd dlmZmZ d dlm	Z	m
Z
 d dlmZ ddlmZmZmZ  e j        e¦  «        Z e ej        ¦   «         ¦  «        Z eedd¦  «        Zdefd	„Zdefd
„Zdefd„Zdefd„Zg d¢Z ej         d¦  «        �e !                    d¦  «         	 	 	 	 	 ddededej"        e         dej"        e         dedej"        e         de
fd„Z#defd„Z$defd„Z%defd„Z&dS )é    N)ÚInvalidSchemeCombinationÚUserInstallationInvalid)ÚSCHEME_KEYSÚScheme)Úrunning_under_virtualenvé   )Úchange_rootÚget_major_minor_versionÚis_osx_frameworkÚget_preferred_schemeÚreturnc                  óN   — dt           v ot          ¦   «          ot          ¦   «         S )a°  Check 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_SCHEMESr   r   © ó    ú`/var/www/html/mpstechhub/venv/lib/python3.11/site-packages/pip/_internal/locations/_sysconfig.pyÚ _should_use_osx_framework_prefixr      s1   € ð( 	 Õ#5Ð5ð 	Ý(Ñ*Ô*Ð*ð	åÑÔðr   c                  ól  — t           rt          d¦  «        S t          ¦   «         rdS t          j        j        › dt
          j        › �} | t          v r| S t          j        j        t          v rt          j        j        S t
          j        › d�}|t          v r|S t
          j        t          v rt
          j        S dS )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_APIr   ÚsysÚimplementationÚnameÚosr   )Úimplementation_suffixedÚsuffixeds     r   Ú_infer_prefixr!   7   sµ   € õ ð /Ý$ XÑ.Ô.Ð.Ý'Ñ)Ô)ð 'Ø&Ð&Ý!$Ô!3Ô!8ÐDÐD½2¼7ÐDÐDÐØÕ"4Ð4Ð4Ø&Ð&Ý
ÔÔÕ"4Ð4Ð4ÝÔ!Ô&Ð&Ý”'Ð"Ð"Ð"€HØÕ%Ð%Ð%ØˆÝ	„wÕ$Ð$Ð$ÝŒwˆØˆ>r   c                  óÒ   — t           rt          d¦  «        S t          ¦   «         rt          ¦   «         sd} nt          j        › d�} | t
          v r| S dt
          vrt          ¦   «         ‚dS )z3Try to find a user scheme for the current platform.ÚuserÚosx_framework_userÚ_userÚ
posix_user)r   r   r   r   r   r   r   ©r    s    r   Ú_infer_userr(   V   sy   € åð -Ý$ VÑ,Ô,Ð,ÝÑÔð %Õ":Ñ"<Ô"<ð %Ø'ˆˆå”gÐ$Ð$Ð$ˆØÕ%Ð%Ð%ØˆØÕ-Ð-Ð-Ý%Ñ'Ô'Ð'Øˆ<r   c                  óf   — t           rt          d¦  «        S t          j        › d�} | t          v r| S dS )z,Try to find a home for the current platform.ÚhomeÚ_homeÚ
posix_home)r   r   r   r   r'   s    r   Ú_infer_homer-   e   s>   € åð -Ý$ VÑ,Ô,Ð,Ý”'Ð Ð Ð €HØÕ%Ð%Ð%ØˆØˆ<r   )Úinstalled_baseÚbaseÚinstalled_platbaseÚplatbaser   Úexec_prefixÚuserbaseFÚ	dist_namer#   r*   ÚrootÚisolatedr   c                 ó„  ‡‡— |r‰rt          dd¦  «        ‚‰r‰rt          dd¦  «        ‚‰�t          ¦   «         }n|rt          ¦   «         }nt          ¦   «         }‰�|dk    rd}‰�ˆfd„t          D ¦   «         }n‰�ˆfd„t          D ¦   «         }ni }t          j        ||¬	¦  «        }t          ¦   «         rz|r!|                     d
t          j
        ¦  «        }	n |                     dt          j
        ¦  «        }	dt          ¦   «         › �}
t          j                             |	dd|
¦  «        |d<   n| sd} t          |d         |d         t          j                             |d         | ¦  «        |d         |d         ¬¦  «        }|�9t           D ]1}t#          |t%          ||¦  «        ¦  «        }t'          |||¦  «         Œ2|S )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--homeNr   r   c                 ó   •— i | ]}|‰“ŒS r   r   )Ú.0Úkr*   s     €r   ú
<dictcomp>zget_scheme.<locals>.<dictcomp>¤   s   ø€ Ð1Ð1Ð1 �Q˜Ð1Ð1Ð1r   c                 ó   •— i | ]}|‰“ŒS r   r   )r9   r:   r   s     €r   r;   zget_scheme.<locals>.<dictcomp>¦   s   ø€ Ð3Ð3Ð3 1�Q˜Ð3Ð3Ð3r   )ÚschemeÚvarsr3   r/   ÚpythonÚincludeÚsiteÚUNKNOWNÚplatlibÚpurelibÚscriptsÚdata)rC   rD   ÚheadersrE   rF   )r   r-   r(   r!   Ú
_HOME_KEYSÚ	sysconfigÚ	get_pathsr   Úgetr   r   r
   r   ÚpathÚjoinr   r   r	   ÚgetattrÚsetattr)r4   r#   r*   r5   r6   r   Úscheme_nameÚ	variablesÚpathsr/   Ú	python_xyr=   ÚkeyÚvalues     `  `        r   Ú
get_schemerV   |   s   øø€ ð* ð =�ð =Ý& x°Ñ<Ô<Ð<Øð =�ð =Ý& x°Ñ<Ô<Ð<àÐÝ!‘m”mˆˆØ	ð &Ý!‘m”mˆˆå#‘o”oˆð
 Ð˜kÐ-DÒDÐDØ$ˆàÐØ1Ð1Ð1Ð1¥jÐ1Ñ1Ô1ˆ	ˆ	Ø	Ð	Ø3Ð3Ð3Ð3­
Ð3Ñ3Ô3ˆ	ˆ	àˆ	åÔ {¸ÐCÑCÔC€Eõ  Ñ!Ô!ð Øð 	5Ø—=’= ­S¬ZÑ8Ô8ˆDˆDà—=’= ­¬Ñ4Ô4ˆDØ8Õ4Ñ6Ô6Ð8Ð8ˆ	Ýœ7Ÿ<š<¨¨i¸ÀÑKÔKˆˆiÑÐØð Øˆ	åØ�iÔ Ø�iÔ Ý”—’˜U 9Ô-¨yÑ9Ô9Ø�iÔ Ø�6Œ]ðñ ô €Fð ÐÝð 	(ð 	(ˆCÝ ¥g¨f°cÑ&:Ô&:Ñ;Ô;ˆEÝ�F˜C Ñ'Ô'Ð'Ð'Ø€Mr   c                  ó˜   — t           j        d d…         dk    rt           j        d d…         dk    rdS t          j        ¦   «         d         S )Né   Údarwiné   z/System/Library/z/usr/local/binrE   )r   Úplatformr   rI   rJ   r   r   r   Úget_bin_prefixr\   É   sG   € å
„|�B�Q�BÔ˜8Ò#Ð#­¬
°3°B°3¬Ð;MÒ(MÐ(MØÐÝÔÑ Ô  Ô+Ð+r   c                  ó4   — t          j        ¦   «         d         S )NrD   ©rI   rJ   r   r   r   Úget_purelibr_   Ð   ó   € ÝÔÑ Ô  Ô+Ð+r   c                  ó4   — t          j        ¦   «         d         S )NrC   r^   r   r   r   Úget_platlibrb   Ô   r`   r   )FNNFN)'Úloggingr   r   rI   ÚtypingÚpip._internal.exceptionsr   r   Úpip._internal.models.schemer   r   Úpip._internal.utils.virtualenvr   r/   r	   r
   r   Ú	getLoggerÚ__name__ÚloggerÚsetÚget_scheme_namesr   rN   r   Úboolr   Ústrr!   r(   r-   rH   Úget_config_varÚappendÚOptionalrV   r\   r_   rb   r   r   r   ú<module>rr      si  ðØ €€€Ø 	€	€	€	Ø 
€
€
€
Ø Ð Ð Ð Ø €€€à VÐ VÐ VÐ VÐ VÐ VÐ VÐ VØ ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø CÐ CÐ CÐ CÐ CÐ Cà HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ HÐ Hà	ˆÔ	˜8Ñ	$Ô	$€ð �SÐ3˜Ô3Ñ5Ô5Ñ6Ô6Ð à˜ 	Ð+AÀ4ÑHÔHÐ ð¨$ð ð ð ð ð4�sð ð ð ð ð>�Sð ð ð ð ð�Sð ð ð ð ðð ð €
ð €9Ô˜JÑ'Ô'Ð3Ø×Ò�jÑ!Ô!Ð!ð
 Ø!%Ø!%ØØ#'ðJð JØðJà
ðJð Œ/˜#Ô
ðJð Œ/˜#Ô
ð	Jð
 ðJð ŒO˜CÔ ðJð ðJð Jð Jð JðZ,˜ð ,ð ,ð ,ð ,ð,�Sð ,ð ,ð ,ð ,ð,�Sð ,ð ,ð ,ð ,ð ,ð ,r   