
    Vh                        d Z ddlmZ ddlZddlZddlZddlZddlZej                  j                  Z
 ej                  d      Zd Zd Zedk(  r e        yy)zJCustom entry-point for pip that filters out unwanted logging and warnings.    )annotationsNz^(.*Running pip install with root privileges is generally not a good idea.*|.*Running pip as the 'root' user can result in broken permissions .*|Ignoring .*: markers .* don't match your environment|Looking in indexes: .*|Requirement already satisfied.*)$c                b    t         j                  |j                               ryt        | |      S )z+Globally omit logging of unwanted messages.r   )LOGGING_MESSAGE_FILTERsearch
getMessageBUILTIN_FILTERER_FILTER)selfrecords     Y/home/dcms/DCMS/lib/python3.12/site-packages/ansible_test/_util/target/setup/quiet_pip.pycustom_filterer_filterr      s)    $$V%6%6%89"400    c                    t         t        j                  _        t        j
                  j                  d      } 	 | r}t        j                  j                  |       \  }}t        j                  j                  |      d   }t        j                  j                  d|       t        j                  |dd       y	t        j                  ddd       y	# t        $ r-}t        d|z         t        j                   d       Y d	}~y	d	}~ww xY w)
zMain program entry point.GET_PIPr   __main__T)run_name	alter_syszpip.__main__zpip is unavailable: %s   N)r   loggingFiltererfilterosenvirongetpathsplitsplitextsysinsertrunpy
run_moduleImportErrorprintexit)get_pip	directoryfilenamemoduleexs        r   mainr)      s     5GjjnnY'G
"$''--"8IxWW%%h/2FHHOOAy)VjDI^jDQ &+,s   A>C 9C 	D#DDr   )__doc__
__future__r   r   r   rer   r   r   r   r   compiler   r   r)   __name__ r   r   <module>r0      s`    P "  	 	  
!**11 # %) * 1* zF r   