PATH:
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
pip
/
_internal
/
locations
/
__pycache__
� ��o�P��� �z � d dl mZ d dlZd dlZd dlZd dlZd dlmZmZ d dl m Z mZ d dlm Z ddlmZmZmZ ej e� � Z e ej � � � � Z eedd� � Zdd�Zd d �Zd d�Zd d�Zg d�Z ej d� � �e� d� � d!d"d�Z!d d�Z"d d�Z#d d�Z$dS )#� )�annotationsN)�InvalidSchemeCombination�UserInstallationInvalid)�SCHEME_KEYS�Scheme)�running_under_virtualenv� )�change_root�get_major_minor_version�is_osx_framework�get_preferred_scheme�return�boolc �N � dt v ot � � 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 � � �t/builddir/build/BUILD/cloudlinux-venv-1.0.10/venv/lib/python3.11/site-packages/pip/_internal/locations/_sysconfig.py� _should_use_osx_framework_prefixr s1 � �( �#5�5� �(�*�*�*� ����r �strc �l � t rt d� � S t � � rdS t j j � dt j � �} | t v r| S t j j t v rt j j S t j � d�}|t v r|S t j t v rt j S dS )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$ 8 s� � � � /�$�X�.�.�.�'�)�)� '�&�&�!$�!3�!8�D�D�2�7�D�D���"4�4�4�&�&� ���"4�4�4��!�&�&��'�"�"�"�H��%�%�%��� �w�$�$�$��w���>r c �� � t rt d� � S t � � rt � � sd} nt j � d�} | t v r| S dt vrt � � �dS )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+ W sy � �� -�$�V�,�,�,���� %�":�"<�"<� %�'����g�$�$�$���%�%�%����-�-�-�%�'�'�'��<r c �f � t rt d� � S t j � d�} | t v r| S dS )z,Try to find a home for the current platform.�home�_home� posix_home)r r! r r r* s r �_infer_homer0 f s>