JFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3RbrJFIFxxC      C  " }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr MRe@sdZdddddddgZdd lZdd lZdd lZdd lZdd lZdd lmZdd l m Z Gd dde Z d dZ e d ddZ e ddZe ddZe ddZeeefZd S)z/Utilities for extracting common archive formatsunpack_archiveunpack_zipfileunpack_tarfiledefault_filterUnrecognizedFormatextraction_driversunpack_directoryN)ensure_directory)DistutilsErrorc@seZdZdZdS)rz#Couldn't recognize the archive typeN)__name__ __module__ __qualname____doc__rr2/tmp/pip-l4uy7dan-build/setuptools/archive_util.pyr s cCs|S)z@The default progress/filter callback; returns True for all filesr)srcdstrrrrsc Cs[xT|p tD]6}y||||Wntk r>w Yq XdSq Wtd|dS)aUnpack `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. Nz!Not a recognized archive type: %s)rr)filename extract_dirprogress_filterZdriversZdriverrrrr*s c CsGtjj|s(td|fnid|f|6}xtj|D]\}}}||\}}xD|D]<} || dtjj|| f|tjj|| sz unpack_tarfile..rz..NT)tarfiler2TarErrorrchownr&r.r/rrrislnkissymlinkname posixpathdirnamenormpath _getmemberisfilerr0sep_extract_member ExtractErrorr4) rrrtarobjmemberr&Z prelim_dstlinkpathZ final_dstrrrrs8  %'  $)r__all__r*r>rrrD pkg_resourcesr distutils.errorsr rrrrrrrrrrrs < (),*