U
ʗRe @ s d dl Z d dlZd dlZd dlZd dlmZmZ d dlmZ d dl m
Z
ddejj dejj dejj
gZe
rddhZd d
e eeD Zdeee eedd
dZedddZedddZdS ) N)ListOptional)main)WINDOWSpip. z.exec C s g | ]}d |qS )r )join).0parts r /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_internal/utils/entrypoints.py
s r F)args_nowarnreturnc C s |st jd t| S )a Central wrapper for all old entrypoints.
Historically pip has had several entrypoints defined. Because of issues
arising from PATH, sys.path, multiple Pythons, their interactions, and most
of them having a pip installed, users suffer every time an entrypoint gets
moved.
To alleviate this pain, and provide a mechanism for warning users and
directing them to an appropriate place for help, we now define all of
our old entrypoints as wrappers for the current one.
a WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
)sysstderrwriter )r r r r r
_wrapper s
r )r c C s t rdnd} tjtj| }tjtjdd tj
}tj||k}|rtD ]2}t
|}|rRtj|tj||rR| S qRt dS )zHTry to figure out the best way to invoke pip in the current environment.ScriptsbinPATHr z -m pip)r ospathr r prefixnormcaseenvirongetsplitpathsep_EXECUTABLE_NAMESshutilwhichsamefile#get_best_invocation_for_this_python)binary_directory
binary_prefix
path_partsexe_are_in_PATHexe_namefound_executabler r r
get_best_invocation_for_this_pip/ s
r, c C s6 t j} tj| }t|}|r2tj|| r2|S | S )z