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KO}ӽmSşذqsOy?\[,d@'73'j%kOe`1.g2"e =YIzS2|zŐƄa\U,dP;jhhhaxǶ?КZ՚.q SE+XrbOu%\GتX(H,N^~]JyEZQKceTQ]VGYqnah;y$cQahT&QPZ*iZ8UQQM.qo/T\7X"u?Mttl2Xq(IoW{R^ ux*SYJ! 4S.Jy~ BROS[V|žKNɛP(L6V^|cR7i7nZW1Fd@ Ara{詑|(T*dN]Ko?s=@ |_EvF]׍kR)eBJc" MUUbY6`~V޴dJKß&~'d3i WWWWWW
Current Directory: /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport
Viewing File: /usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyc
� r2Wc @s>ddlmZdZdZdZdZdZdZddlZddl Z ddl Z ddl Z ddl Z ddl Z ddlZddlZyddlZddlZWnek r�eZZnXeefZyeef7ZWnek r�nXd d d d gZejd dkr3ddlZn ddlZejZdZdZ e dZ!dZ"dZ#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1d Z2d!Z3d"Z4d#Z5d Z6d$Z7d%Z8e7Z9e'e(e)e*e-e.e/e+e,e0e1e2f Z:e'e(e/e2fZ;e0e1e2fZ<d&d'd(d)d*d+d,d-fZ=e>d&d'd,d-f�Z?ie@d.6e@d/6e@d)6eAd*6eAd+6eAd(6ZBd0ZCd1ZDd2ZEd3ZFd4ZGd5ZHd6ZId7ZJdZKd8ZLd9ZMd:ZNd;ZOd<ZPd=ZQd>ZRd%ZSd$ZTe jUd?d@fkr)dAZVn ejW�ZVdB�ZXdC�ZYdD�ZZd=e9dE�Z[dF�Z\edG�Z]eCdHfeDdIfeEdJfeFdKfeGdLfeHdMffeLdNffeMdOffeNeIBdPfeId feNd!ffeOdNffePdOffeQeJBdPfeJd feQd!ffeRdNffeSdOffeTeKBdQfeKdRfeTd!fff Z^dS�Z_d e`fdT��YZadUeafdV��YZbdWeafdX��YZcdYeafdZ��YZdd[eafd\��YZed]eafd^��YZfd_effd`��YZgdaeffdb��YZhdceffdd��YZideeffdf��YZjdgeffdh��YZkdielfdj��YZmdkelfdl��YZndmelfdn��YZodoelfdp��YZpdqelfdr��YZqdselfdt��YZrd elfdu��YZsd elfdv��YZtdwelfdx��YZudy�ZveZwetjZdS(zi����(tprint_functions $Revision$s0.9.0s&Lars Gust\u00e4bel (lars@gustaebel.de)s5$Date: 2011-02-25 17:42:01 +0200 (Fri, 25 Feb 2011) $s?$Id: tarfile.py 88586 2011-02-25 15:42:01Z marc-andre.lemburg $s8Gustavo Niemeyer, Niels Gust\u00e4bel, Richard Townsend.NtTarFiletTarInfot is_tarfiletTarErroriitiisustar tustar00idi�t0t1t2t3t4t5t6t7tLtKtStxtgtXiitpathtlinkpathtsizetmtimetuidtgidtunametgnametatimetctimei�i�i`i@i iiiii�i@i iiitnttcesutf-8cCs,|j||�}|| |t|�tS(s8Convert a string to a null-terminated bytes object. (tencodetlentNUL(tstlengthtencodingterrors((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytstn�scCs8|jd�}|dkr(|| }n|j||�S(s8Convert a null-terminated bytes object to a string. Ri����(tfindtdecode(R$R&R'tp((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytnts�s  cCs�|dtd�kr^y%tt|dd�p1dd�}Wq�tk rZtd��q�XnId}x@tt|�d�D](}|dK}|t||d�7}q{W|S( s/Convert a number field to a python number. ii�tasciitstrictRisinvalid headeri(tchrtintR,t ValueErrortInvalidHeaderErrortrangeR"tord(R$tnti((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytnti�s%  cCs�d|kod|dknrHd|d|fjd�t}n�|tksh|d|dkrwtd��n|dkr�tjdtjd |��d}nt�}x6t|d�D]$}|j d|d @�|dL}q�W|j dd �|S( s/Convert a python number to a number field. iiis%0*oR-isoverflow in number fieldRtli�i�( R!R#t GNU_FORMATR1tstructtunpacktpackt bytearrayR3tinsert(R5tdigitstformatR$R6((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytitn�s $$  % cCsxdttjd|d �tjd|dd!��}dttjd|d �tjd|dd!��}||fS( s�Calculate the checksum for a member's header by summing up all characters except for the chksum field which is treated as if it was filled with spaces. According to the GNU tar sources, some tars (Sun and NeXT) calculate chksum with signed char, which will be different if there are chars in the buffer with the high bit set. So we calculate two checksums, unsigned and signed. it148Bi�t356Bi�it148bt356b(tsumR:R;(tbuftunsigned_chksumt signed_chksum((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt calc_chksums�s 77cCs|dkrdS|dkrSx0trN|jd�}|s>Pn|j|�qWdSd}t||�\}}xQt|�D]C}|j|�}t|�|kr�td��n|j|�q{W|dkr|j|�}t|�|kr�td��n|j|�ndS(sjCopy length bytes from fileobj src to fileobj dst. If length is None, copy the entire content. iNiisend of file reachedi@i@(tNonetTruetreadtwritetdivmodR3R"tIOError(tsrctdstR%RGtBUFSIZEtblockst remaindertb((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt copyfileobjs,    R8t-RVtdtcR+trtwR$tttTcCsig}xStD]K}xB|D]-\}}||@|kr|j|�PqqW|jd�q Wdj|�S(scConvert a file's mode to a string of the form -rwxrwxrwx. Used by TarFile.list() RXt(tfilemode_tabletappendtjoin(tmodetpermttabletbittchar((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytfilemode8s  cBseZdZRS(sBase exception.(t__name__t __module__t__doc__(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRGst ExtractErrorcBseZdZRS(s%General exception for extract errors.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRlJst ReadErrorcBseZdZRS(s%Exception for unreadble tar archives.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRmMstCompressionErrorcBseZdZRS(s.Exception for unavailable compression methods.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRnPst StreamErrorcBseZdZRS(s=Exception for unsupported operations on stream-like TarFiles.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRoSst HeaderErrorcBseZdZRS(s!Base exception for header errors.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRpVstEmptyHeaderErrorcBseZdZRS(sException for empty headers.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRqYstTruncatedHeaderErrorcBseZdZRS(s Exception for truncated headers.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRr\stEOFHeaderErrorcBseZdZRS(s"Exception for end of file headers.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRs_sR2cBseZdZRS(sException for invalid headers.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR2bstSubsequentHeaderErrorcBseZdZRS(s3Exception for missing and invalid extended headers.(RiRjRk(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRtest _LowLevelFilecBs2eZdZd�Zd�Zd�Zd�ZRS(s�Low-level file object. Supports reading and writing. It is used instead of a regular file object for streaming access. cCsgitjd6tjtjBtjBd6|}ttd�rK|tjO}ntj||d�|_dS(NR[R\tO_BINARYi�( tostO_RDONLYtO_WRONLYtO_CREATtO_TRUNCthasattrRvtopentfd(tselftnameRc((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt__init__rs cCstj|j�dS(N(RwtcloseR~(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�{scCstj|j|�S(N(RwRMR~(RR((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRM~scCstj|j|�dS(N(RwRNR~(RR$((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRN�s(RiRjRkR�R�RMRN(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRuls   t_StreamcBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z d d �Z dd �Z d �Zd �ZRS(s�Class that serves as an adapter between TarFile and a stream-like object. The stream-like object only needs to have a read() or write() method and is accessed blockwise. Use of gzip or bzip2 compression is possible. A stream-like object could be for example: sys.stdin, sys.stdout, a socket, a tape device etc. _Stream is intended to be used only internally. cCs�t|_|dkr0t||�}t|_n|dkrWt|�}|j�}n|p`d|_||_||_ ||_ ||_ d|_ d|_ t|_y�|dkr%yddl}Wntk r�td��nX||_|jd�|_|dkr|j�q%|j�n|d kr�yddl}Wntk r`td ��nX|dkr�d|_|j�|_q�|j�|_nWn,|js�|j j�nt|_�nXdS( s$Construct a _Stream object. t*R_itgzi����Nszlib module is not availableR[tbz2sbz2 module is not available(RLt _extfileobjRKRutFalset _StreamProxyt getcomptypeR�RctcomptypetfileobjtbufsizeRGtpostclosedtzlibt ImportErrorRntcrc32tcrct _init_read_gzt_init_write_gzR�tdbuftBZ2Decompressortcmpt BZ2CompressorR�(RR�RcR�R�R�R�R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��sP                        cCs*t|d�r&|j r&|j�ndS(NR�(R|R�R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt__del__�scCs�|jjd|jj|jj |jjd�|_tjdtt j ���}|j d|d�|j j d�r�|j d |_ n|j |j j dd �t�d S( s6Initialize for writing with gzip compression. i is<Ls�s�s.gzi����s iso-8859-1treplaceN(R�t compressobjtDEFLATEDt MAX_WBITSt DEF_MEM_LEVELR�R:R<R0ttimet_Stream__writeR�tendswithR!R#(Rt timestamp((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s   cCsw|jdkr-|jj||j�|_n|jt|�7_|jdkrf|jj|�}n|j|�dS(s&Write string s to the stream. R�ttarN( R�R�R�R�R�R"R�tcompressR�(RR$((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRN�s cCs_|j|7_xIt|j�|jkrZ|jj|j|j �|j|j|_qWdS(s]Write string s to the stream if a whole new block is ready to be written. N(RGR"R�R�RN(RR$((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt__write�scCs�|jr dS|jdkrF|jdkrF|j|jj�7_n|jdkr�|jr�|jj|j�d|_|jdkr�|jjtj d|j d@��|jjtj d|j d@��q�n|j s�|jj �nt|_dS(s[Close the _Stream object. No operation should be done on it afterwards. NR\R�R_R�s<LI����(R�RcR�RGR�tflushR�RNR:R<R�R�R�R�RL(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s  #) cCss|jj|jj �|_d|_|jd�dkrItd��n|jd�dkrmtd��nt|jd��}|jd�|d @r�t|jd��d t|jd��}|j |�n|d @rx3t r|jd�}| s |t kr�Pq�q�Wn|d @rUx3t rQ|jd�}| sJ|t kr"Pq"q"Wn|d@ro|jd�nd S(s:Initialize for reading a gzip compressed fileobj. R_is�snot a gzip fileissunsupported compression methodiiiiiN( R�t decompressobjR�R�R�t _Stream__readRmRnR4RMRLR#(RtflagtxlenR$((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�s.   ,       cCs|jS(s3Return the stream's file pointer position. (R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyttell#sicCs|||jdkrit||j|j�\}}x$t|�D]}|j|j�q?W|j|�n td��|jS(sXSet the stream's file pointer to pos. Negative seeking is forbidden. is seeking backwards is not allowed(R�ROR�R3RMRo(RR�RTRUR6((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytseek(s cCs�|dkrZg}x3trG|j|j�}|s7Pn|j|�qWdj|�}n|j|�}|jt|�7_|S(s�Return the next size number of bytes from the stream. If size is not defined, return all bytes of the stream up to EOF. R_N(RKRLt_readR�RaRbR�R"(RRR]RG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRM5s  cCs�|jdkr|j|�St|j�}x�||kr�|j|j�}|sVPny|jj|�}Wntk r�td��nX|j|7_|t|�7}q.W|j| }|j||_|S(s+Return size bytes from the stream. R�sinvalid compressed data( R�R�R"R�R�R�t decompressRPRm(RRRZRG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�Gs    cCs�t|j�}xN||kr_|jj|j�}|s=Pn|j|7_|t|�7}qW|j| }|j||_|S(ssReturn size bytes from stream. If internal buffer is empty, read another block from the stream. (R"RGR�RMR�(RRRZRG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt__read\s N(RiRjRkR�R�R�RNR�R�R�R�R�RKRMR�R�(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s  4       R�cBs2eZdZd�Zd�Zd�Zd�ZRS(ssSmall proxy class that enables transparent compression detection for the Stream interface (mode 'r|*'). cCs"||_|jjt�|_dS(N(R�RMt BLOCKSIZERG(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�qs cCs|jj|_|jS(N(R�RMRG(RR((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRMuscCs0|jjd�rdS|jjd�r,dSdS(Ns�R�tBZh91R�R�(RGt startswith(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�ys cCs|jj�dS(N(R�R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s(RiRjRkR�RMR�R�(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�ls    t _BZ2ProxycBsSeZdZd Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z RS( sSmall proxy class that enables external file object support for "r:bz2" and "w:bz2" modes. This is actually a workaround for a limitation in bz2 module's BZ2File class which (unlike gzip.GzipFile) has no support for a file object argument. iicCs8||_||_t|jdd�|_|j�dS(NR�(R�RctgetattrRKR�tinit(RR�Rc((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s  cCsbddl}d|_|jdkrO|j�|_|jjd�d|_n|j�|_dS(Ni����iR[R_( R�R�RcR�tbz2objR�R�RGR�(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s   cCs�t|j�}x`||krq|jj|j�}|s=Pn|jj|�}|j|7_|t|�7}qW|j| }|j||_|jt|�7_|S(N(R"RGR�RMt blocksizeR�R�R�(RRRtrawtdataRG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRM�s cCs4||jkr|j�n|j||j�dS(N(R�R�RM(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s cCs|jS(N(R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��scCs;|jt|�7_|jj|�}|jj|�dS(N(R�R"R�R�R�RN(RR�R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRN�scCs5|jdkr1|jj�}|jj|�ndS(NR\(RcR�R�R�RN(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��si@( RiRjRkR�R�R�RMR�R�RNR�(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s     t _FileInFilecBsAeZdZdd�Zd�Zd�Zd�Zdd�ZRS(sA thin wrapper around an existing file object that provides a part of its data as an individual file object. cCs||_||_||_d|_|dkrBd|fg}nd|_g|_d}|j}xs|D]k\}}||kr�|jjt||df�n|jjt ||||f�||7}||}qjW||jkr |jjt||jdf�ndS(Ni( R�toffsetRtpositionRKt map_indextmapRaR�RL(RR�R�Rt blockinfotlastpostrealpos((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s$           cCs#t|jd�stS|jj�S(Ntseekable(R|R�RLR�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��scCs|jS(s*Return the current file position. (R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��scCs ||_dS(s(Seek to a position in the file. N(R�(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��scCsK|dkr|j|j}nt||j|j�}d}x|dkrFx|tr�|j|j\}}}}||jko�|knr�PqP|jd7_|jt|j�krPd|_qPqPWt|||j�}|r|jj ||j|�||jj |�7}n|t |7}||8}|j|7_qAW|S(s!Read data from the file. R_iiN( RKRR�tminRLR�R�R"R�R�RMR#(RRRGR�tstarttstopR�R%((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRM�s(   N( RiRjRkRKR�R�R�R�RM(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s     t ExFileObjectcBs�eZdZdZd�Zd�Zd�Zd�Zdd�Z e Z dd�Z d �Z d �Z ejd �Zd �Zd �ZRS(saFile-like object for reading an archive member. Is returned by TarFile.extractfile(). icCsdt|j|j|j|j�|_|j|_d|_t|_|j|_d|_ d|_ dS(NR[iR_( R�R�t offset_dataRtsparseR�RcR�R�R�tbuffer(Rttarfilettarinfo((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�s      cCstS(N(RL(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytreadable!scCstS(N(R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytwritable$scCs |jj�S(N(R�R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�'scCs�|jrtd��nd}|jrh|dkrH|j}d|_qh|j| }|j||_n|dkr�||jj�7}n ||jj|t|��7}|jt|�7_|S(s~Read at most size bytes from the file. If size is not present or None, read all data until EOF is reached. sI/O operation on closed fileR_N(R�R1R�RKR�RMR"R�(RRRG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRM*s        i����cCs |jrtd��n|jjd�d}|dkr�x|tr�|jj|j�}|j|7_| szd|kr=|jjd�d}|dkr�t|j�}nPq=q=Wn|dkr�t ||�}n|j| }|j||_|j t|�7_ |S(s�Read one entire line from the file. If size is present and non-negative, return a string with at most that size, which may be an incomplete line. sI/O operation on closed files iii����( R�R1R�R)RLR�RMR�R"R�R�(RRR�RG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytreadlineEs$       cCs:g}x-tr5|j�}|s%Pn|j|�q W|S(s0Return a list with all remaining lines. (RLR�Ra(Rtresulttline((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt readlinesbs  cCs|jrtd��n|jS(s*Return the current file position. sI/O operation on closed file(R�R1R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�ls cCs|jrtd��n|tjkrHtt|d�|j�|_n�|tjkr�|dkrt|j|d�|_q�t|j||j�|_nC|tj kr�tt|j||j�d�|_n td��d|_ |j j |j�dS(s(Seek to a position in the file. sI/O operation on closed fileisInvalid argumentR_N( R�R1RwtSEEK_SETR�tmaxRR�tSEEK_CURtSEEK_ENDR�R�R�(RR�twhence((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�ts ! (  cCs t|_dS(sClose the file object. N(RLR�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��sccs,x%tr'|j�}|sPn|VqWdS(s/Get an iterator over the file's lines. N(RLR�(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt__iter__�s   N(RiRjRkR�R�R�R�R�RKRMtread1R�R�R�RwR�R�R�R�(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�s       cBs�eZdZd?Zdd�Zd�Zd�Zeee�Zd�Z d�Z ee e �Z d�Z d�Z eedd�Zd�Zd �Zd!�Zed"��Zd#�Zed$��Zed%��Zed&��Zed'��Zed(��Zed)��Zd*�Zd+�Zd,�Z d-�Z!d.�Z"d/�Z#d0�Z$d1�Z%d2�Z&d3�Z'd4�Z(d5�Z)d6�Z*d7�Z+d8�Z,d9�Z-d:�Z.d;�Z/d<�Z0d=�Z1d>�Z2RS(@sInformational class which holds the details about an archive member given by a tar header block. TarInfo objects are returned by TarFile.getmember(), TarFile.getmembers() and TarFile.gettarinfo() and are usually created internally. R�RcRRRRtchksumttypetlinknameRRtdevmajortdevminorR�R�t pax_headersR�R�t_sparse_structst _link_targetR_cCs�||_d|_d|_d|_d|_d|_d|_t|_d|_ d|_ d|_ d|_ d|_ d|_d|_d|_i|_dS(sXConstruct a TarInfo object. name is the optional name of the member. i�iR_N(R�RcRRRRR�tREGTYPER�R�RRR�R�R�R�RKR�R�(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s"                cCs|jS(N(R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt_getpath�scCs ||_dS(N(R�(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt_setpath�scCs|jS(N(R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt _getlinkpath�scCs ||_dS(N(R�(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt _setlinkpath�scCs d|jj|jt|�fS(Ns<%s %r at %#x>(t __class__RiR�tid(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt__repr__�scCs�i |jd6|jd@d6|jd6|jd6|jd6|jd6|jd6|jd 6|jd 6|j d 6|j d 6|j d 6|j d6}|d t kr�|djd� r�|dcd7<n|S(s9Return the TarInfo's attributes as a dictionary. R�i�RcRRRRR�R�R�RRR�R�t/(R�RcRRRRR�R�R�RRR�R�tDIRTYPER�(Rtinfo((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytget_info�s"            $tsurrogateescapecCsv|j�}|tkr+|j|||�S|tkrJ|j|||�S|tkrf|j||�Std��dS(s<Return a tar header as a string of 512 byte blocks. sinvalid formatN(R�t USTAR_FORMATtcreate_ustar_headerR9tcreate_gnu_headert PAX_FORMATtcreate_pax_headerR1(RR@R&R'R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyttobuf�s    cCst|d<t|d�tkr/td��nt|d�tkri|j|d�\|d<|d<n|j|t||�S(s3Return the object as a ustar header block. tmagicR�slinkname is too longR�tprefix(t POSIX_MAGICR"t LENGTH_LINKR1t LENGTH_NAMEt_posix_split_namet_create_headerR�(RR�R&R'((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s  $cCs�t|d<d}t|d�tkrI||j|dt||�7}nt|d�tkr�||j|dt||�7}n||j|t||�S(s:Return the object as a GNU header block sequence. R�R_R�R�( t GNU_MAGICR"R�t_create_gnu_long_headertGNUTYPE_LONGLINKR�tGNUTYPE_LONGNAMER�R9(RR�R&R'RG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�s ##c Cs�t|d<|jj�}x�ddtfddtfddfD]�\}}}||kr_q>ny||jd d �Wn"tk r�||||<q>nXt||�|kr>||||<q>q>Wx�ddddfD]�\}}||krd||<q�n||}d|ko+d |dkn s@t|t �r�t |�||<d||<q�q�W|r|j |t |�} nd} | |j |td d�S(s�Return the object as a ustar header block. If it cannot be represented this way, prepend a pax extended header sequence with supplement information. R�R�RR�RRi RR-R.RiRRi RiiR_R�(sunamesunamei (sgnamesgnamei (suidi(sgidi(ssizei (smtimei (R�R�tcopyR�R�R!tUnicodeEncodeErrorR"t isinstancetfloattstrt_create_pax_generic_headertXHDTYPER�R�( RR�R&R�R�thnameR%R?tvalRG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�s4      4cCs|j|td�S(sAReturn the object as a pax global header block sequence. tutf8(RtXGLTYPE(tclsR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytcreate_pax_global_headerDscCs�|td }x$|r4|ddkr4|d }qW|t|�}|d }| sht|�tkrwtd��n||fS(sUSplit a name longer than 100 chars into a prefix and a name part. ii����R�sname is too long(t LENGTH_PREFIXR"R�R1(RR�R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�Js cCs�t|jdd�d||�t|jdd�d@d|�t|jdd�d|�t|jd d�d|�t|jd d�d |�t|jd d�d |�d |jdt�t|jdd�d||�|jdt�t|jdd�d||�t|jdd�d||�t|jdd�d|�t|jdd�d|�t|jdd�d||�g}tjdtdj|��}t |t �d}|d d|j d�|d}|S(s�Return a header block. info is a dictionary with file information, format must be one of the *_FORMAT constants. R�R_idRcii�iRRRi Rs R�R�R�Ri RR�R�R�i�s%dsi����s%06oR-i����( R(tgetRAR�R�R:R<R�RbRJR!(R�R@R&R'tpartsRGR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�Ys&$#cCs@tt|�t�\}}|dkr<|t|t7}n|S(sdReturn the string payload filled with zero bytes up to the next 512 byte border. i(ROR"R�R#(tpayloadRTRU((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt_create_payloadus cCsm|j||�t}i}d|d<||d<t|�|d<t|d<|j|t||�|j|�S(sTReturn a GNUTYPE_LONGNAME or GNUTYPE_LONGLINK sequence for name. s ././@LongLinkR�R�RR�(R!R#R"R�R�R�R(R R�R�R&R'R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�s   c Cs�t}xI|j�D];\}}y|jdd�Wqtk rMt}PqXqWd}|rk|d7}nx�|j�D]�\}}|jd�}|r�|j|d�}n|jd�}t|�t|�d}d} } x6tr|tt| ��} | | krPn| } q�W|tt| �d�d |d |d 7}qxWi} d | d <|| d<t|�| d<t| d<|j | t dd�|j |�S(s�Return a POSIX.1-2008 extended or global header sequence that contains a list of keyword, value pairs. The values must be strings. R R.R_s21 hdrcharset=BINARY R�iiR-t t=s s././@PaxHeaderR�R�RR�R�( R�titemsR!RRLR"RtbytesR�R�R�R( R R�R�R&tbinarytkeywordtvaluetrecordsR8R5R+R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�s<       1   cCs2t|�dkr!td��nt|�tkrBtd��n|jt�tkrftd��nt|dd!�}|t|�kr�t d��n|�}t |dd!||�|_ t|dd !�|_ t|d d !�|_ t|d d !�|_t|d d !�|_t|d d!�|_||_|dd !|_t |d d!||�|_t |dd!||�|_t |dd!||�|_t|dd!�|_t|dd!�|_t |dd!||�}|jtkr |j jd�r t|_n|jtkr�d}g}x|td�D]n} y6t|||d!�} t||d|d!�} Wntk r�PnX|j| | f�|d7}q4Wt|d�} t|dd!�} || | f|_ n|j!�r|j j"d�|_ n|r.|jt#kr.|d|j |_ n|S(sAConstruct a TarInfo object from a 512 byte bytes object. is empty headerstruncated headersend of file headeri�i�s bad checksumidiliti|i�i�ii i)iIiQiYi�R�i�ii ii�i�i�($R"RqR�RrtcountR#RsR7RJR2R,R�RcRRRRR�R�R�RRR�R�tAREGTYPER�R�tGNUTYPE_SPARSER3R1RatboolR�tisdirtrstript GNU_TYPES(R RGR&R'R�tobjR�R�tstructsR6R�tnumbytest isextendedtorigsize((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytfrombuf�sZ  !   cCsP|jjt�}|j||j|j�}|jj�t|_|j|�S(sOReturn the next TarInfo object from TarFile object tarfile. ( R�RMR�R&R&R'R�R�t _proc_member(R R�RGR!((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt fromtarfilescCst|jttfkr"|j|�S|jtkr>|j|�S|jtttfkrc|j |�S|j |�SdS(sYChoose the right processing method depending on the type and call it. N( R�R�R�t _proc_gnulongRt _proc_sparseRR tSOLARIS_XHDTYPEt _proc_paxt _proc_builtin(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR's   cCsx|jj�|_|j}|j�s6|jtkrO||j|j�7}n||_|j |j |j |j �|S(sfProcess a builtin type or an unknown type which will be treated as a regular file. ( R�R�R�tisregR�tSUPPORTED_TYPESt_blockRR�t_apply_pax_infoR�R&R'(RR�R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR-$s  cCs�|jj|j|j��}y|j|�}Wntk rPtd��nX|j|_|jt kr�t ||j |j �|_ n-|jtkr�t ||j |j �|_n|S(sSProcess the blocks that hold a GNU longname or longlink member. s missing or bad subsequent header(R�RMR0RR(RpRtR�R�R�R,R&R'R�R�R�(RR�RGtnext((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR)5s  c Cs|j\}}}|`x�|r�|jjt�}d}x�td�D]}}y6t|||d!�}t||d|d!�} Wntk r�PnX|r�| r�|j|| f�n|d7}qFWt|d�}qW||_ |jj �|_ |j |j |j �|_||_ |S(s8Process a GNU sparse header plus extra headers. iii ii�(R�R�RMR�R3R7R1RaRR�R�R�R0RR�( RR�R"R$R%RGR�R6R�R#((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR*Ks(     cCs�|jj|j|j��}|jtkr9|j}n|jj�}tj d|�}|dk r�|j d�j d�|d<n|j d�}|dkr�|j}nd}tjd�}d}x�tr�|j||�}|s�Pn|j�\} } t| �} ||jd�d|jd�| d!} |j| dd|j�} | tkr}|j| ||j|j�} n|j| dd|j�} | || <|| 7}q�Wy|j|�} Wntk r�td ��nXd |kr|j| |�nbd |kr$|j| ||�n@|j d �d krd|j d�dkrd|j| ||�n|jtt fkr�| j!||j|j�|j"| _"d|kr�| j#} | j$�s�| jt%kr�| | j| j�7} n| |_"q�n| S(sVProcess an extended or global header as described in POSIX.1-2008. s\d+ hdrcharset=([^\n]+)\niR t hdrcharsettBINARYs(\d+) ([^=]+)=iis missing or bad subsequent headersGNU.sparse.mapsGNU.sparse.sizesGNU.sparse.majorRsGNU.sparse.minorRRN(&R�RMR0RR�R R�RtretsearchRKtgroupR*RR&tcompileRLtmatchtgroupsR0tendR�t_decode_pax_fieldR'tPAX_NAME_FIELDSR(RpRtt_proc_gnusparse_01t_proc_gnusparse_00t_proc_gnusparse_10RR+R1R�R�R.R/(RR�RGR�R9R3R&tregexR�R%RRR2R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR,gs`      +        *   cCs�g}x6tjd|�D]"}|jt|jd���qWg}x6tjd|�D]"}|jt|jd���qXWtt||��|_dS(s?Process a GNU tar extended sparse header, version 0.0. s\d+ GNU.sparse.offset=(\d+)\nis\d+ GNU.sparse.numbytes=(\d+)\nN(R5tfinditerRaR0R7tlisttzipR�(RR2R�RGtoffsetsR9R#((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR?�s  cCsbg|djd�D]}t|�^q}tt|ddd�|ddd���|_dS(s?Process a GNU tar extended sparse header, version 0.1. sGNU.sparse.mapt,Nii(tsplitR0RCRDR�(RR2R�RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR>�s,cCs�d}g}|jjt�}|jdd�\}}t|�}xjt|�|dkr�d|kr�||jjt�7}n|jdd�\}}|jt|��qEW|jj�|_ t t |ddd�|ddd���|_ dS(s?Process a GNU tar extended sparse header, version 1.0. s iiN( RKR�RMR�RGR0R"RaR�R�RCRDR�(RR2R�R�tfieldsR�RGtnumber((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR@�s  cCsx�|j�D]�\}}|dkr8t|d|�q |dkr]t|dt|��q |dkr�t|dt|��q |tkr |tkr�yt||�}Wq�tk r�d}q�Xn|dkr�|jd�}nt|||�q q W|j�|_dS( soReplace fields with supplemental information from a previous pax extended or global header. sGNU.sparse.nameRsGNU.sparse.sizeRsGNU.sparse.realsizeiR�N( RtsetattrR0t PAX_FIELDStPAX_NUMBER_FIELDSR1RRR�(RR�R&R'RR((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR1�s"        cCs9y|j|d�SWntk r4|j||�SXdS(s1Decode a single field from a pax record. R.N(R*tUnicodeDecodeError(RRR&tfallback_encodingtfallback_errors((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR<s cCs0t|t�\}}|r(|d7}n|tS(s_Round up a byte count by BLOCKSIZE and return it, e.g. _block(834) => 1024. i(ROR�(RRRTRU((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR0 s cCs |jtkS(N(R�t REGULAR_TYPES(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR.scCs |j�S(N(R.(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytisfilescCs |jtkS(N(R�R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRscCs |jtkS(N(R�tSYMTYPE(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytissymscCs |jtkS(N(R�tLNKTYPE(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytislnkscCs |jtkS(N(R�tCHRTYPE(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytischr scCs |jtkS(N(R�tBLKTYPE(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytisblk"scCs |jtkS(N(R�tFIFOTYPE(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytisfifo$scCs |jdk S(N(R�RK(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytissparse&scCs|jtttfkS(N(R�RVRXRZ(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytisdev(s(snamesmodesuidsgidssizesmtimeschksumstypeslinknamesunamesgnamesdevmajorsdevminorsoffsets offset_datas pax_headersssparsestarfiles_sparse_structss _link_target(3RiRjRkt __slots__R�R�R�tpropertyRR�R�RR�R�tDEFAULT_FORMATtENCODINGR�R�R�R�t classmethodR R�t staticmethodR�RR�RR&R(R'R-R)R*R,R?R>R@R1R<R0R.RQRRSRURWRYR[R\R](((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�s`         1  3?    f             c Bs-eZdZdZeZeZdZeZ e Z d1Z eZeZd1dd1d1d1d1d1d1dd1d1d1d� Zed1dd1ed��Zedd1d��Zedd1dd ��Zedd1dd ��Zid d 6d d6dd6Zd�Zd�Zd�Zd�Zd1d1d1d�Zed�Z d1ed1d1d�Z!d1d�Z"dd1d�Z#ded�Z$d�Z%ed�Z&d�Z'd �Z(d!�Z)d"�Z*d#�Z+d$�Z,d%�Z-d&�Z.d'�Z/d(�Z0d1ed)�Z1d*�Z2d1d+�Z3d,�Z4d-�Z5d.�Z6d/�Z7d0�Z8RS(2s=The TarFile Class provides an interface to tar archives. iiR[R�c Cs�t|�dks|dkr-td��n||_idd6dd6dd 6||_|s�|jdkr�tjj|� r�d |_d|_nt||j�}t|_ nN|d kr�t |d �r�|j }nt |d �r�|j|_nt |_ |rtjj|�nd |_ ||_|d k rC||_n|d k r[||_n|d k rs||_n|d k r�||_n|d k r�||_n| |_| d k r�|jtkr�| |_n i|_| d k r�| |_n| d k r | |_nt|_g|_t|_|jj�|_i|_y9|jdkrod |_ |j!�|_ n|jdkrx�t r|jj"|j�y&|jj#|�}|jj$|�Wq�t%k r�|jj"|j�Pq�t&k r } t't(| ���q�Xq�Wn|jd krzt |_|jrz|jj)|jj*��}|jj+|�|jt|�7_qznWn,|j s�|jj,�nt |_�nXd S(s�Open an (uncompressed) tar archive `name'. `mode' is either 'r' to read from an existing archive, 'a' to append data to an existing file or 'w' to create a new file overwriting an existing one. `mode' defaults to 'r'. If `fileobj' is given, it is used for reading or writing data. If it can be determined, `mode' is overridden by `fileobj's mode. `fileobj' is not closed, when TarFile is closed. iR�smode must be 'r', 'a' or 'w'trbR[sr+btatwbR\R�RctawN(-R"R1Rct_modeRwRtexistst bltn_openR�R�RKR|R�RLtabspathR�R@R�t dereferencet ignore_zerosR&R'R�R�tdebugt errorlevelR�tmemberst_loadedR�R�tinodest firstmemberR2R�R(RaRsRpRmRR RRNR�(RR�RcR�R@R�RlRmR&R'R�RnRoteRG((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�Fs�  ""     !                             c Ks4| r| rtd��n|dkr�x�|jD]�}t||j|�}|dk rj|j�}ny||d||�SWq3ttfk r�} |dk r3|j|�q3q3q3Xq3Wtd��nUd|krV|jdd�\} }| p�d} |pd}||jkr3t||j|�}ntd|��||| ||�Sd |kr|jd d�\} }| p�d} |p�d}| d kr�td ��nt || |||�} y||| | |�} Wn| j ��nXt | _ | S|d kr$|j ||||�Std ��dS(s|Open a tar archive for reading, writing or appending. Return an appropriate TarFile class. mode: 'r' or 'r:*' open for reading with transparent compression 'r:' open for reading exclusively uncompressed 'r:gz' open for reading with gzip compression 'r:bz2' open for reading with bzip2 compression 'a' or 'a:' open for appending, creating the file if necessary 'w' or 'w:' open for writing without compression 'w:gz' open for writing with gzip compression 'w:bz2' open for writing with bzip2 compression 'r|*' open a stream of tar blocks with transparent compression 'r|' open an uncompressed stream of tar blocks for reading 'r|gz' open a gzip compressed stream of tar blocks 'r|bz2' open a bzip2 compressed stream of tar blocks 'w|' open an uncompressed stream for writing 'w|gz' open a gzip compressed stream for writing 'w|bz2' open a bzip2 compressed stream for writing snothing to openR[sr:*s%file could not be opened successfullyt:iR�sunknown compression type %rt|trwsmode must be 'r' or 'w'Rgsundiscernible modeN(R[sr:*(R1t OPEN_METHR�RKR�RmRnR�RGR�R�R�R�ttaropen( R R�RcR�R�tkwargsR�tfunct saved_posRtRhtstreamR]((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR}�sN              cKs@t|�dks|dkr-td��n|||||�S(sCOpen uncompressed tar archive name for reading or writing. iR�smode must be 'r', 'a' or 'w'(R"R1(R R�RcR�Rz((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRy�si c Ks6t|�dks|dkr-td��nyddl}|jWn#ttfk ritd��nX|dk }y8|j||d||�}|j||||�}Wnxt k r�| r�|dk r�|j �n|dkr��nt d��n*| r"|dk r"|j �n�nX||_ |S( skOpen gzip compressed tar archive name for reading or writing. Appending is not allowed. iRwsmode must be 'r' or 'w'i����Nsgzip module is not availableRVsnot a gzip file( R"R1tgziptGzipFileR�tAttributeErrorRnRKRyRPR�RmR�( R R�RcR�t compresslevelRzR~t extfileobjR]((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytgzopens.        cKs�t|�dks|dkr-td��nyddl}Wntk r\td��nX|dk r{t||�}n|j||d|�}y|j||||�}Wn-t t fk r�|j �t d��nXt |_|S( slOpen bzip2 compressed tar archive name for reading or writing. Appending is not allowed. iRwsmode must be 'r' or 'w'.i����Nsbz2 module is not availableR�snot a bzip2 file(R"R1R�R�RnRKR�tBZ2FileRyRPtEOFErrorR�RmR�R�(R R�RcR�R�RzR�R]((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytbz2open$s     RyR�R�R�R�R�cCs�|jr dS|jdkr�|jjttd�|jtd7_t|jt�\}}|dkr�|jjtt|�q�n|j s�|jj �nt |_dS(slClose the TarFile. In write-mode, two finishing zero blocks are appended to the archive. NRgii( R�RcR�RNR#R�R�ROt RECORDSIZER�R�RL(RRTRU((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�Hs   cCs2|j|�}|dkr.td|��n|S(sReturn a TarInfo object for member `name'. If `name' can not be found in the archive, KeyError is raised. If a member occurs more than once in the archive, its last occurrence is assumed to be the most up-to-date version. sfilename %r not foundN(t _getmemberRKtKeyError(RR�R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt getmember\s cCs'|j�|js |j�n|jS(s�Return the members of the archive as a list of TarInfo objects. The list has the same order as the members in the archive. (t_checkRqt_loadRp(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt getmembersgs   cCs g|j�D]}|j^q S(s�Return the members of the archive as a list of their names. It has the same order as the list returned by getmembers(). (R�R�(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pytgetnamesqsc Cs\|jd�|d k r%|j}n|d kr:|}ntjj|�\}}|jtjd�}|jd�}|j �}||_ |d kr�t td�r�|j r�tj |�}q�tj|�}ntj|j��}d}|j}tj|�r�|j|jf} |j rj|jdkrj| |jkrj||j| krjt} |j| }qt} | dr||j| <qn�tj|�r�t} nstj|�r�t} n[tj|�r�t} tj|�}n4tj |�r�t!} ntj"|�rt#} nd S||_||_$|j%|_&|j'|_(| tkr]|j)|_*n d|_*|j+|_,| |_-||_.t/r�yt/j0|j&�d|_1Wq�t2k r�q�Xnt3r�yt3j4|j(�d|_5Wq�t2k r�q�Xn| t!t#fkrXt td�rXt td�rXtj6|j7�|_8tj9|j7�|_:qXn|S( sOCreate a TarInfo object for either the file `name' or the file object `fileobj' (using os.fstat on its file descriptor). You can modify some of the TarInfo's attributes before you add it using addfile(). If given, `arcname' specifies an alternative name for the file in the archive. RgR�tlstatR_iitmajortminorN(;R�RKR�RwRt splitdriveR�tseptlstripR�R�R|RlR�tstattfstattfilenotst_modetS_ISREGtst_inotst_devtst_nlinkRrRTR�tS_ISDIRR�tS_ISFIFORZtS_ISLNKRRtreadlinktS_ISCHRRVtS_ISBLKRXRctst_uidRtst_gidRtst_sizeRtst_mtimeRR�R�tpwdtgetpwuidRR�tgrptgetgrgidRR�tst_rdevR�R�R�( RR�tarcnameR�tdrvR�tstatresR�tstmdtinodeR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt gettarinfows~         "                c Csp|j�x_|D]W}|r�tt|j�dd�td|jpK|j|jpZ|jfdd�|j�s�|j �r�tdd|j |j fdd�ntd|j dd�tdt j|j�d dd�nt|j|j�rd nd dd�|ra|j�r9td |jdd�n|j�ratd |jdd�qant�qWd S(s�Print a table of contents to sys.stdout. If `verbose' is False, only the names of the members are printed. If it is True, an `ls -l'-like output is produced. R;Rs%s/%ss%10ss%d,%ds%10ds%d-%02d-%02d %02d:%02d:%02diR�R_s->slink toN(R�tprintRhRcRRRRRWRYR�R�RR�t localtimeRR�RRSR�RU(RtverboseR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyRC�s&   !)  c Cs�|jd�|dkr"|}n|dk rtddl}|jdtd�||�rt|jdd|�dSn|jdk r�tjj |�|jkr�|jdd|�dS|jd|�|j ||�}|dkr�|jdd |�dS|dk r;||�}|dkr;|jdd|�dSn|j �rst |d �}|j ||�|j�n�|j�r�|j |�|r�xTtj|�D]@}|jtjj||�tjj||�||d |�q�Wq�n |j |�dS( s~Add the file `name' to the archive. `name' may be any type of file (directory, fifo, symbolic link, etc.). If given, `arcname' specifies an alternative name for the file in the archive. Directories are added recursively by default. This can be avoided by setting `recursive' to False. `exclude' is a function that should return True for each filename to be excluded. `filter' is a function that expects a TarInfo object argument and returns the changed TarInfo object, if it returns None the TarInfo object will be excluded from the archive. Rgi����Nsuse the filter argument insteadistarfile: Excluded %rstarfile: Skipped %ristarfile: Unsupported type %rRdtfilter(R�RKtwarningstwarntDeprecationWarningt_dbgR�RwRRkR�R.RjtaddfileR�RtlistdirtaddRb( RR�R�t recursivetexcludeR�R�R�tf((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��sD        *        *cCs�|jd�tj|�}|j|j|j|j�}|jj|�|jt |�7_|dk r�t ||j|j �t |j t�\}}|dkr�|jjtt|�|d7}n|j|t7_n|jj|�dS(s]Add the TarInfo object `tarinfo' to the archive. If `fileobj' is given, tarinfo.size bytes are read from it and added to the archive. You can create TarInfo objects using gettarinfo(). On Windows platforms, `fileobj' should always be opened with mode 'rb' to avoid irritation about the file size. RgiiN(R�RR�R@R&R'R�RNR�R"RKRWRROR�R#RpRa(RR�R�RGRTRU((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�4s    t.cCs:g}|dkr|}nx_|D]W}|j�r\|j|�tj|�}d|_n|j||d|j� �q"W|jdd��|j�x�|D]�}tj j ||j �}y4|j ||�|j ||�|j||�Wq�tk r1}|jdkr�q2|jdd|�q�Xq�WdS(sMExtract all members from the archive to the current working directory and set owner, modification time and permissions on directories afterwards. `path' specifies a different directory to extract to. `members' is optional and must be a subset of the list returned by getmembers(). i�t set_attrstkeycSs|jS(N(R�(Re((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt<lambda>dsis tarfile: %sN(RKRRaRRctextracttsorttreverseRwRRbR�tchowntutimetchmodRlRoR�(RRRpt directoriesR�tdirpathRt((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt extractallNs*      !  R_cCs=|jd�t|t�r.|j|�}n|}|j�r^tjj||j�|_ ny,|j |tjj||j �d|�Wn�t k r�}|j dkr��q9|jdkr�|jdd|j�q9|jdd|j|jf�n<tk r8}|j dkr!�q9|jdd|�nXdS(sxExtract a member from the archive to the current working directory, using its full name. Its file information is extracted as accurately as possible. `member' may be a filename or a TarInfo object. You can specify a different directory using `path'. File attributes (owner, mtime, mode) are set unless `set_attrs' is False. R[R�iis tarfile: %sstarfile: %s %rN(R�RRR�RURwRRbR�R�t_extract_memberR�tEnvironmentErrorRotfilenameRKR�tstrerrorRl(RtmemberRR�R�Rt((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�ts&  ! #cCs�|jd�t|t�r.|j|�}n|}|j�rP|j||�S|jtkro|j||�S|j�s�|j �r�t|j t �r�t d��q�|j |j|��SndSdS(s�Extract a member from the archive as a file object. `member' may be a filename or a TarInfo object. If `member' is a regular file, a file-like object is returned. If `member' is a link, a file-like object is constructed from the link's target. If `member' is none of the above, None is returned. The file-like object is read-only and provides the following methods: read(), readline(), readlines(), seek() and tell() R[s'cannot extract (sym)link as file objectN(R�RRR�R.t fileobjectR�R/RURSR�R�Rot extractfilet_find_link_targetRK(RR�R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s  cCs�|jd�}|jdtj�}tjj|�}|r_tjj|� r_tj|�n|j�sw|j �r�|j dd|j |j f�n|j d|j �|j �r�|j||�n�|j�r�|j||�n�|j�r |j||�n�|j�s"|j�r5|j||�n]|j�sM|j �r`|j||�n2|jtkr�|j||�n|j||�|r�|j||�|j �s�|j||�|j||�q�ndS(s\Extract the TarInfo object tarinfo to a physical file called targetpath. R�is%s -> %sN(RR�RwR�RtdirnameRitmakedirsRURSR�R�R�R.tmakefileRtmakedirR[tmakefifoRWRYtmakedevtmakelinkR�R/t makeunknownR�R�R�(RR�t targetpathR�t upperdirs((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s4#    cCsFytj|d�Wn+tk rA}|jtjkrB�qBnXdS(s,Make a directory called targetpath. i�N(RwtmkdirR�terrnotEEXIST(RR�R�Rt((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s cCs�|j}|j|j�t|d�}|jdk rqxJ|jD])\}}|j|�t|||�qAWnt|||j�|j|j�|j�|j �dS(s'Make a file called targetpath. RfN( R�R�R�RjR�RKRWRttruncateR�(RR�R�tsourcettargetR�R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR��s   cCs+|j||�|jdd|j�dS(sYMake a file from a TarInfo object with an unknown type at targetpath. is9tarfile: Unknown file type %r, extracted as regular file.N(R�R�R�(RR�R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR� s cCs/ttd�rtj|�n td��dS(s'Make a fifo called targetpath. tmkfifosfifo not supported by systemN(R|RwR�Rl(RR�R�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR� scCs�ttd� s ttd� r/td��n|j}|j�rT|tjO}n |tjO}tj||tj |j |j ��dS(s<Make a character or block device called targetpath. tmknodR�s'special devices not supported by systemN( R|RwRlRcRYR�tS_IFBLKtS_IFCHRR�R�R�R�(RR�R�Rc((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR� s     cCs�yj|j�r%tj|j|�nDtjj|j�rPtj|j|�n|j|j |�|�WnPt k r�|j�r�tjj tjj |j �|j�}q�|j}n>Xy|j|j |�|�Wntk r�td��nXdS(s�Make a (symbolic) link called targetpath. If it cannot be created (platform limitation), we try to make a copy of the referenced file instead of a link. s%unable to resolve link inside archiveN(RSRwtsymlinkR�RRiR�tlinkR�R�tsymlink_exceptionRbR�R�R�Rl(RR�R�R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�' s"       cCstrttd�rtj�dkrytj|j�d}Wntk r]|j}nXytj |j �d}Wntk r�|j }nXyZ|j �r�ttd�r�tj |||�n%tjdkr�tj|||�nWqtk r}td��qXndS(s6Set owner of targetpath according to tarinfo. tgeteuidiitlchowntos2emxscould not change ownerN(R�R|RwR�R�tgetgrnamRR�RtgetpwnamRRRSR�tsystplatformR�R�Rl(RR�R�RtuRt((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�D s '    cCsOttd�rKytj||j�WqKtk rG}td��qKXndS(sASet file permissions of targetpath according to tarinfo. R�scould not change modeN(R|RwR�RcR�Rl(RR�R�Rt((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�Z s cCsYttd�sdSy tj||j|jf�Wntk rT}td��nXdS(sBSet modification time of targetpath according to tarinfo. R�Ns"could not change modification time(R|RwR�RR�Rl(RR�R�Rt((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�c s  cCs�|jd�|jdk r2|j}d|_|S|jj|j�d}xktr�y|jj|�}WnGt k r�}|j r�|j dd|j|f�|jt 7_qNq�n�t k r+}|j r|j dd|j|f�|jt 7_qNq�|jdkr�tt|���q�n�tk rY|jdkr�td��q�n[tk r�}|jdkr�tt|���q�n%tk r�}tt|���nXPqNW|dk r�|jj|�n t|_|S(s�Return the next member of the archive as a TarInfo object, when TarFile is opened for reading. Return None if there is no more available. trais0x%X: %sis empty fileN(R�RsRKR�R�R�RLR�R(RsRmR�R�R2RmRRqRrRtRpRaRq(RtmR�Rt((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR2n sF          cCs�|j�}|dk r.||j|� }n|rItjj|�}nxKt|�D]=}|rztjj|j�}n |j}||krV|SqVWdS(s}Find an archive member by name from bottom to top. If tarinfo is given, it is used as the starting point. N(R�RKtindexRwRtnormpathtreversedR�(RR�R�t normalizeRpR�t member_name((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�� s    cCs6x&tr(|j�}|dkrPqqWt|_dS(sWRead through the entire archive file and look for readable members. N(RLR2RKRq(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�� s    cCsW|jr"td|jj��n|dk rS|j|krStd|j��ndS(snCheck if TarFile is still open, and if the operation's mode corresponds to TarFile's mode. s %s is closedsbad operation for mode %rN(R�RPR�RiRKRc(RRc((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�� s cCs�|j�r5tjj|j�d|j}d}n|j}|}|j|d|dt�}|dkr~t d|��n|S(sZFind the target member of a symlink or hardlink member in the archive. R�R�R�slinkname %r not foundN( RSRwRR�R�R�RKR�RLR�(RR�R�tlimitR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�� s     cCs$|jrt|j�St|�SdS(s$Provide an iterator object. N(RqtiterRptTarIter(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�� s  cCs)||jkr%t|dtj�ndS(s.Write debugging output to sys.stderr. tfileN(RnR�R�tstderr(Rtleveltmsg((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�� scCs|j�|S(N(R�(R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt __enter__� s cCs?|dkr|j�n"|js2|jj�nt|_dS(N(RKR�R�R�RLR�(RR�Rt traceback((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt__exit__� s    N(9RiRjRkRnR�RlRmRoR`R@RaR&RKR'RR�R�R�R�RbR�R}RyR�R�RxR�R�R�R�R�RLRCR�R�R�R�R�R�R�R�R�R�R�R�R�R�R�R2R�R�R�R�R�R�RR(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR,sn  iK   b > &# & 0       1    R�cBs/eZdZd�Zd�Zd�ZeZRS(sMIterator Class. for tarinfo in TarFile(...): suite... cCs||_d|_dS(s$Construct a TarIter object. iN(R�R�(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR� s cCs|S(s Return iterator object. ((R((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR� scCs}|jjs9|jj�}|sjt|j_t�qjn1y|jj|j}Wntk rit�nX|jd7_|S(s�Return the next item using TarFile's next() method. When all members have been read, set TarFile as _loaded. i(R�RqR2RLt StopIterationRpR�t IndexError(RR�((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt__next__ s     (RiRjRkR�R�RR2(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR�� s    cCs7yt|�}|j�tSWntk r2tSXdS(sfReturn True if name points to a tar archive that we are able to handle, else return False. N(R}R�RLRR�(R�R]((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyR# s    (xt __future__Rt __version__tversiont __author__t__date__t __cvsid__t __credits__R�RwR�R�R�R:RR5R�R�R�RKR�tNotImplementedErrorR�t WindowsErrort NameErrort__all__t version_infot __builtin__tbuiltinsR}t_openR#R�R�R�R�R�R�R R�RRTRRRVRXR�RZtCONTTYPER�R�RRR R+R�R9R�R`R/RPR RKtsetR=RR0RLtS_IFLNKtS_IFREGR�tS_IFDIRR�tS_IFIFOtTSUIDtTSGIDtTSVTXtTUREADtTUWRITEtTUEXECtTGREADtTGWRITEtTGEXECtTOREADtTOWRITEtTOEXECR�RatgetfilesystemencodingR(R,R7RARJRWR`Rht ExceptionRRlRmRnRoRpRqRrRsR2RttobjectRuR�R�R�R�R�RRR�RRj(((sI/usr/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/tarfile.pyt<module>s.                                                 �?K��������*