ž Ÿ/{YÉc@sñdZdddddddgZdd lZdd lZdd lZdd lZdd lZdd lmZdd l m Z Gd d„de ƒZ d d„Z e d dd„Ze dd„Ze dd„Ze dd„ZeeefZd S(u/Utilities for extracting common archive formatsuunpack_archiveuunpack_zipfileuunpack_tarfileudefault_filteruUnrecognizedFormatuextraction_driversuunpack_directoryiN(uensure_directory(uDistutilsErrorcBs|EeZdZdZdS(uUnrecognizedFormatu#Couldn't recognize the archive typeN(u__name__u __module__u __qualname__u__doc__(u __locals__((u0/tmp/pip-jy811g-build/setuptools/archive_util.pyuUnrecognizedFormat scCs|S(u@The default progress/filter callback; returns True for all files((usrcudst((u0/tmp/pip-jy811g-build/setuptools/archive_util.pyudefault_filtersc Cs[xT|p tD]6}y||||ƒWntk r>w Yq XdSq Wtd|ƒ‚dS(u¡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. Nu!Not a recognized archive type: %s(uextraction_driversuUnrecognizedFormat(ufilenameu extract_diruprogress_filterudriversudriver((u0/tmp/pip-jy811g-build/setuptools/archive_util.pyuunpack_archive*s c CsGtjj|ƒs(td|fƒ‚nid|f|6}xtj|ƒD]ô\}}}||\}}xD|D]<} || dtjj|| ƒf|tjj|| ƒ¶su unpack_tarfile..u/u..NiiÿÿÿÿT(utarfileuopenuTarErroruUnrecognizedFormatuchownunameu startswithusplituosupathujoinuNoneuislnkuissymulinknameu posixpathudirnameunormpathu _getmemberuisfileuisdiruendswithusepu_extract_memberu ExtractErroruTrueuclose( ufilenameu extract_diruprogress_filterutarobjumemberunameu prelim_dstulinkpathu final_dst((u0/tmp/pip-jy811g-build/setuptools/archive_util.pyuunpack_tarfile¨s8  %'  $(u__doc__u__all__uzipfileutarfileuosushutilu posixpathu pkg_resourcesuensure_directoryudistutils.errorsuDistutilsErroruUnrecognizedFormatudefault_filteruNoneuunpack_archiveuunpack_directoryuunpack_zipfileuunpack_tarfileuextraction_drivers(((u0/tmp/pip-jy811g-build/setuptools/archive_util.pyus < (),*