;ò ÿ¬Ec@sÄdZdddddddgZdkZdkZdkZdkZd klZd kl Z de fd „ƒYZ d „Z e e d „Z e d„Ze d„Ze d„ZeeefZdS(s/Utilities for extracting common archive formatssunpack_archivesunpack_zipfilesunpack_tarfilesdefault_filtersUnrecognizedFormatsextraction_driverssunpack_directoryN(sensure_directory(sDistutilsErrorcBstZdZRS(s#Couldn't recognize the archive type(s__name__s __module__s__doc__(((sW/mnt/gmirror/ports/devel/py-setuptools/work/setuptools-0.6c7/setuptools/archive_util.pysUnrecognizedFormat s cCs|SdS(s@The default progress/filter callback; returns True for all filesN(sdst(ssrcsdst((sW/mnt/gmirror/ports/devel/py-setuptools/work/setuptools-0.6c7/setuptools/archive_util.pysdefault_filterscCs]xV|ptD]7}y||||ƒWntj o qqXdSqWtd|ƒ‚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(sdriverssextraction_driverssdriversfilenames extract_dirsprogress_filtersUnrecognizedFormat(sfilenames extract_dirsprogress_filtersdriverssdriver((sW/mnt/gmirror/ports/devel/py-setuptools/work/setuptools-0.6c7/setuptools/archive_util.pysunpack_archive*sc CsOtii|ƒ otd|fƒ‚nh|d|f<}xti|ƒD]÷\} }} || \}}xD|D]<}||dtii||ƒf|tii| |ƒµss/s..iÿÿÿÿN(starfilesopensfilenamestarobjsTarErrorsUnrecognizedFormatschownsmembersisfilesisdirsnames startswithsosspathsjoins extract_dirssplitsdstsprogress_filtersendswithsseps_extract_membersTruesclose(sfilenames extract_dirsprogress_filtersmembersnamesdststarobj((sW/mnt/gmirror/ports/devel/py-setuptools/work/setuptools-0.6c7/setuptools/archive_util.pysunpack_tarfile¥s*   (s__doc__s__all__szipfilestarfilesossshutils pkg_resourcessensure_directorysdistutils.errorssDistutilsErrorsUnrecognizedFormatsdefault_filtersNonesunpack_archivesunpack_directorysunpack_zipfilesunpack_tarfilesextraction_drivers(s__all__sunpack_archiveszipfilesunpack_tarfilestarfilesensure_directorysunpack_zipfilesUnrecognizedFormatsunpack_directorysdefault_filtersshutilsossDistutilsErrorsextraction_drivers((sW/mnt/gmirror/ports/devel/py-setuptools/work/setuptools-0.6c7/setuptools/archive_util.pys?s$   ) ) ) #