£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>

Rec           @@  s  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 d d l Z d d l	 m
 Z
 d d l m Z m Z m Z m Z d d l m Z d d l m Z e r d d l m Z m Z m Z m Z m Z d d	 l m Z n  e j e  Z e e Z y d d l Z e e 7Z Wn e  k
 rDe j! d
  n Xy d d l" Z" e e 7Z Wn e  k
 re j! d  n Xd   Z# d   Z$ d   Z% d   Z& d   Z' d   Z( e) d  Z* d   Z+ d d  Z- d S(   s   Utilities related archives.
i    (   t   absolute_importN(   t   InstallationError(   t   BZ2_EXTENSIONSt   TAR_EXTENSIONSt   XZ_EXTENSIONSt   ZIP_EXTENSIONS(   t
   ensure_dir(   t   MYPY_CHECK_RUNNING(   t   Iterablet   Listt   Optionalt   Textt   Union(   t   ZipInfos   bz2 module is not availables   lzma module is not availablec          C@  s    t  j d  }  t  j |   |  S(   sB   Get the current umask which involves having to set it temporarily.i    (   t   ost   umask(   t   mask(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt   current_umask/   s    c         C@  s   |  j  d  j  d  }  d |  k rj d |  k rN |  j d  |  j d  k  sZ d |  k rj |  j d d  Sd |  k r |  j d d  S|  d g Sd  S(   Nt   /s   \i   t    (   t   lstript   findt   split(   t   path(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt   split_leading_dir7   s    *c         C@  s\   d } xO |  D]G } t |  \ } } | s/ t S| d k rD | } q | | k r t Sq Wt S(   sy   Returns true if all the paths have the same leading path name
    (i.e., everything is in one subdirectory in an archive)N(   t   NoneR   t   Falset   True(   t   pathst   common_prefixR   t   prefixt   rest(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt   has_leading_dirG   s    	c         C@  sF   t  j j |   } t  j j |  } t  j j | | g  } | | k S(   sL   
    Return true if the absolute path of target is within the directory
    (   R   R   t   abspatht   commonprefix(   t	   directoryt   targett   abs_directoryt
   abs_targetR   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt   is_within_directoryW   s    c         C@  s    t  j |  d t   @d B d S(   sx   
    Make file present at path have execute for user/group/world
    (chmod +x) is no-op on windows per python docs
    i  iI   N(   R   t   chmodR   (   R   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt2   set_extracted_file_to_default_mode_plus_executablec   s    c         C@  s0   |  j  d ?} t | o, t j |  o, | d @ S(   Ni   iI   (   t   external_attrt   boolt   statt   S_ISREG(   t   infot   mode(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt   zip_item_is_executablel   s    c         C@  s  t  |  t |  d  } zat j | d t } t | j    oF | } x-| j   D]} | j } | } | r t	 |  d } n  t
 j j | |  } t
 j j |  }	 t | |  s d }
 t |
 j |  | |    n  | j d  s | j d  r	t  |  qV t  |	  | j |  } z, t | d   } t j | |  Wd QXWd | j   t |  rtt |  n  XqV WWd | j   Xd S(	   s  
    Unzip the file (with path `filename`) to the destination `location`.  All
    files are written based on system defaults and umask (i.e. permissions are
    not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written. Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    t   rbt
   allowZip64i   sQ   The zip file ({}) has a file ({}) trying to install outside target directory ({})R   s   \t   wbN(   R   t   opent   zipfilet   ZipFileR   R    t   namelistt   infolistt   filenameR   R   R   t   joint   dirnameR'   R   t   formatt   endswitht   shutilt   copyfileobjt   closeR0   R)   (   R9   t   locationt   flattent   zipfpt   zipt   leadingR.   t   namet   fnt   dirt   messaget   fpt   destfp(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt
   unzip_filet   s4    

	

c         C@  s  t  |  |  j   j d  s4 |  j   j d  r= d } np |  j   j t  r[ d } nR |  j   j t  ry d } n4 |  j   j d  r d } n t j d |   d	 } t j |  |  } zt	 g  | j
   D] } | j ^ q  } x| j
   D]} | j } | rt |  d
 } n  t j j | |  } t | |  sgd } t | j |  | |    n  | j   rt  |  q | j   ry | j | |  Wqt k
 r}	 t j d |  | j |	  q qXq y | j |  }
 Wn5 t t f k
 r}	 t j d |  | j |	  q n Xt  t j j |   |
 d k	 sHt  t | d   } t j |
 |  Wd QX|
 j   | j  | |  | j! d @r t" |  q q WWd | j   Xd S(   s  
    Untar the file (with path `filename`) to the destination `location`.
    All files are written based on system defaults and umask (i.e. permissions
    are not preserved), except that regular file members with any execute
    permissions (user, group, or world) have "chmod +x" applied after being
    written.  Note that for windows, any execute changes using os.chmod are
    no-ops per the python docs.
    s   .gzs   .tgzs   r:gzs   r:bz2s   r:xzs   .tart   rs-   Cannot determine compression type for file %ss   r:*i   sQ   The tar file ({}) has a file ({}) trying to install outside target directory ({})s/   In the tar file %s the member %s is invalid: %sR3   NiI   (#   R   t   lowerR=   R   R   t   loggert   warningt   tarfileR4   R    t
   getmembersRF   R   R   R   R:   R'   R   R<   t   isdirt   issymt   _extract_membert	   Exceptiont   extractfilet   KeyErrort   AttributeErrorR;   R   t   AssertionErrorR>   R?   R@   t   utimeR/   R)   (   R9   RA   R/   t   tart   memberRE   RG   R   RI   t   excRJ   RK   (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt
   untar_file   sf    

*				
%	

c         C@  s   t  j j |   }  | d k sB |  j   j t  sB t j |   rb t |  | d |  j d  ns | d k s t	 j
 |   s |  j   j t t t  r t |  |  n+ t j d |  | |  t d j |    d  S(   Ns   application/zipRB   s   .whls   application/x-gzipsZ   Cannot unpack file %s (downloaded from %s, content-type: %s); cannot detect archive formats%   Cannot determine archive format of {}(   R   R   t   realpathRN   R=   R   R5   t
   is_zipfileRL   RQ   t
   is_tarfileR   R   R   R_   RO   t   criticalR   R<   (   R9   RA   t   content_type(    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt   unpack_file   s$    (.   t   __doc__t
   __future__R    t   loggingR   R>   R,   RQ   R5   t   pip._internal.exceptionsR   t   pip._internal.utils.filetypesR   R   R   R   t   pip._internal.utils.miscR   t   pip._internal.utils.typingR   t   typingR   R	   R
   R   R   R   t	   getLoggert   __name__RO   t   SUPPORTED_EXTENSIONSt   bz2t   ImportErrort   debugt   lzmaR   R   R    R'   R)   R0   R   RL   R_   R   Re   (    (    (    s   /builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/unpacking.pyt   <module>   sF   "(
							/	V