ó b-äQc@sâdZdddddddgZdd lZdd lZdd lZdd lZdd lZdd lmZdd l m Z de fd „ƒYZ d „Z e d d„Ze d„Ze d„Ze d„ZeeefZd S(s/Utilities for extracting common archive formatstunpack_archivetunpack_zipfiletunpack_tarfiletdefault_filtertUnrecognizedFormattextraction_driverstunpack_directoryiÿÿÿÿN(tensure_directory(tDistutilsErrorcBseZdZRS(s#Couldn't recognize the archive type(t__name__t __module__t__doc__(((s;/usr/lib/python2.7/site-packages/setuptools/archive_util.pyR scCs|S(s@The default progress/filter callback; returns True for all files((tsrctdst((s;/usr/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(tfilenamet extract_dirtprogress_filtertdriverstdriver((s;/usr/lib/python2.7/site-packages/setuptools/archive_util.pyR*s c CsGtjj|ƒs(td|fƒ‚nid|f|6}xtj|ƒD]ô\}}}||\}}xD|D]<} || dtjj|| ƒf|tjj|| ƒ¶sRs..iÿÿÿÿN(ttarfileR.tTarErrorRtchownR#R*R+RRRR7tislnktissymtlinknamet posixpathtdirnametnormpatht _getmembertisfileRR,tsept_extract_membert ExtractErrortTrueR0( RRRttarobjtmemberR#t prelim_dsttlinkpatht final_dst((s;/usr/lib/python2.7/site-packages/setuptools/archive_util.pyR¨s8   %'  $ (R t__all__R&R:RRR@t pkg_resourcesRtdistutils.errorsRRRR7RRRRR(((s;/usr/lib/python2.7/site-packages/setuptools/archive_util.pyts <  ( ) , *