
    /h                     *   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 d dl	m
Z
 ddej        j         dej        j         dej        j         gZe
rddhZd	  e j        ee          D             Zdd
eee                  defdZdefdZdefdZdS )    N)ListOptional)main)WINDOWSpip. z.exec                 8    g | ]}d                      |          S )r	   )join).0partss     R/var/www/html/venv/lib/python3.11/site-packages/pip/_internal/utils/entrypoints.py
<listcomp>r      s2        	      argsreturnc                 ^    t           j                            d           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.
)sysstderrwriter   )r   s    r   _wrapperr      s1     J	"   ::r   c                     t           rdnd} t          j                            t          j        |           }t          j                            t          j                            dd                    	                    t          j
                  }t          j                            |          |v }|rt          D ]{}t          j        |          }t          j                            ||          }|rCt          j                            |          r$t          j                            ||          r|c S |t!                       dS )zHTry to figure out the best way to invoke pip in the current environment.ScriptsbinPATHr	   z -m pip)r   ospathr   r   prefixnormcaseenvirongetsplitpathsep_EXECUTABLE_NAMESshutilwhichexistssamefile#get_best_invocation_for_this_python)binary_directorybinary_prefix
path_partsexe_are_in_PATHexe_namefound_executablebinary_executables          r    get_best_invocation_for_this_pipr1   .   s   $+6yyGLL-=>>M !!"*.."<"<==CCBJOOJg&&}55CO  ) 	  	 H%|H55 "]H E E  GNN#455  G$$$%     233<<<<r   c                      t           j        } t          j                            |           }t          j        |          }|r"t          j                            ||           r|S | S )z<Try to figure out the best way to invoke the current Python.)r   
executabler   r   basenamer%   r&   r(   )exer.   r/   s      r   r)   r)   I   s^    
.Cw$$H |H-- BG,,-=sCC  Jr   )N)	itertoolsr   r%   r   typingr   r   pip._internal.cli.mainr   pip._internal.utils.compatr   version_infomajorminorr$   _allowed_extensionsproductstrintr   r1   r)    r   r   <module>rB      sY       				  



 ! ! ! ! ! ! ! ! ' ' ' ' ' ' . . . . . . 
"#

 "";#

 ;;3#3#9;; 
  v, &Y&'8:MNN   8DI& #    .=# = = = =6S      r   