Hacked By AnonymousFox

Current Path : /opt/alt/python27/lib/python2.7/site-packages/setuptools/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyc

�
��Rec@s�dZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
mZddddd	d
dgZd	efd��YZ
d
�Zedd�Zed�Zed�Zed�ZeeefZdS(s/Utilities for extracting common archive formatsi����N(tDistutilsError(tensure_directorytContextualZipFiletunpack_archivetunpack_zipfiletunpack_tarfiletdefault_filtertUnrecognizedFormattextraction_driverstunpack_directorycBseZdZRS(s#Couldn't recognize the archive type(t__name__t
__module__t__doc__(((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyRscCs|S(s@The default progress/filter callback; returns True for all files((tsrctdst((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyRscCsZxS|ptD]5}y||||�Wntk
r=q
q
XdSq
Wtd|��dS(s�Unpack `filename` to `extract_dir`, or raise ``UnrecognizedFormat``

    `progress_filter` is a function taking two arguments: a source path
    internal to the archive ('/'-separated), and a filesystem path where it
    will be extracted.  The callback must return the desired extract path
    (which may be the same as the one passed in), or else ``None`` to skip
    that file or directory.  The callback can thus be used to report on the
    progress of the extraction, as well as to filter the items extracted or
    alter their extraction paths.

    `drivers`, if supplied, must be a non-empty sequence of functions with the
    same signature as this function (minus the `drivers` argument), that raise
    ``UnrecognizedFormat`` if they do not support extracting the designated
    archive type.  The `drivers` are tried in sequence until one is found that
    does not raise an error, or until all are exhausted (in which case
    ``UnrecognizedFormat`` is raised).  If you do not supply a sequence of
    drivers, the module's ``extraction_drivers`` constant will be used, which
    means that ``unpack_zipfile`` and ``unpack_tarfile`` will be tried, in that
    order.
    Ns!Not a recognized archive type: %s(RR(tfilenametextract_dirtprogress_filtertdriverstdriver((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyRs
cCs:tjj|�s%td|��nid|f|6}x�tj|�D]�\}}}||\}}xD|D]<}	||	dtjj||	�f|tjj||	�<qnWx�|D]y}
tjj||
�}|||
|�}|s�q�nt|�tjj||
�}
tj|
|�tj	|
|�q�WqHWdS(s�"Unpack" a directory, using the same interface as for archives

    Raises ``UnrecognizedFormat`` if `filename` is not a directory
    s%s is not a directorytt/N(
tostpathtisdirRtwalktjoinRtshutiltcopyfiletcopystat(RRRtpathstbasetdirstfilesR
Rtdtfttarget((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyR	?s"
:

c
CsDtj|�s%td|f��nt|��
}x|j�D]�}|j}|jd�sAd|jd�krzqAntj	j
||jd��}|||�}|s�qAn|jd�r�t|�nAt|�|j
|j�}t|d��}|j|�WdQX|jd?}	|	rAtj||	�qAqAWWdQXdS(s�Unpack zip `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
    by ``zipfile.is_zipfile()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    s%s is not a zip fileRs..twbNi(tzipfilet
is_zipfileRRtinfolistRt
startswithtsplitRRRtendswithRtreadtopentwritet
external_attrtchmod(
RRRtztinfotnameR$tdataR#tunix_attributes((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyRZs(	$


c

Cs�ytj|�}Wn'tjk
r<td|f��nXtj|���d�|_xk|D]c}|j}|jd�r`d|j	d�kr`t
jj||j	d��}x�|dk	r6|j�s�|j�r6|j}|j�r$tj|j�}tj||�}tj|�}n|j|�}q�W|dk	r�|j�s[|j�r�|||�}	|	r�|	jt
j�r�|	d }	ny|j||	�Wq�tjk
r�q�Xq�q�q`q`WtSWdQXdS(s�Unpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    s/%s is not a compressed or uncompressed tar filecWsdS(N(tNone(targs((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyt<lambda>�RRs..i����N(ttarfileR-tTarErrorRt
contextlibtclosingtchownR3R)R*RRRR6tislnktissymtlinknamet	posixpathtdirnametnormpatht
_getmembertisfileRR+tsept_extract_membertExtractErrortTrue(
RRRttarobjtmemberR3t
prelim_dsttlinkpathRt	final_dst((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyRs8
	%'	$
(RR&R9RRRAR;tdistutils.errorsRt
pkg_resourcesRRt__all__RRR6RR	RRR(((s�/builddir/build/BUILDROOT/alt-python27-setuptools-36.3.0-4.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/setuptools/archive_util.pyt<module>s$	"%.

Hacked By AnonymousFox1.0, Coded By AnonymousFox