ž à’ReÉ c @ sñ d Z d d d d d d d g Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z d d l m Z Gd d „ d e ƒ Z d d „ Z e d d d „ Z e d d „ Z e d d „ Z e d d „ Z e e e f Z d S( u/ Utilities for extracting common archive formatsu unpack_archiveu unpack_zipfileu unpack_tarfileu default_filteru UnrecognizedFormatu extraction_driversu unpack_directoryi N( u ensure_directory( u DistutilsErrorc B s | Ee Z d Z d Z d S( u UnrecognizedFormatu# Couldn't recognize the archive typeN( u __name__u __module__u __qualname__u __doc__( u __locals__( ( u0 /tmp/pip-k8wh6o-build/setuptools/archive_util.pyu UnrecognizedFormat s c C s | S( u@ The default progress/filter callback; returns True for all files( ( u srcu dst( ( u0 /tmp/pip-k8wh6o-build/setuptools/archive_util.pyu default_filter s c C s[ xT | p t D]6 } y | | | | ƒ Wn t k r> w Yq Xd Sq Wt d | ƒ ‚ d S( 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( u extraction_driversu UnrecognizedFormat( u filenameu extract_diru progress_filteru driversu driver( ( u0 /tmp/pip-k8wh6o-build/setuptools/archive_util.pyu unpack_archive* s c C sG t j j | ƒ s( t d | f ƒ ‚ n i d | f | 6} xt j | ƒ D]ô \ } } } | | \ } } xD | D]<