관리-도구
편집 파일: archive_util.cpython-38.pyc
U �Re� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m Z ddddd d dgZG dd � d e�Zd d� Z e dfdd�Ze fdd�Ze fdd�Zdd� Zdd� Ze fdd�ZeeefZdS )z/Utilities for extracting common archive formats� N)�DistutilsError)�ensure_directory�unpack_archive�unpack_zipfile�unpack_tarfile�default_filter�UnrecognizedFormat�extraction_drivers�unpack_directoryc @ s e Zd ZdZdS )r z#Couldn't recognize the archive typeN)�__name__� __module__�__qualname__�__doc__� r r ��/builddir/build/BUILDROOT/alt-python38-setuptools-58.3.0-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/setuptools/archive_util.pyr s c C s |S )z@The default progress/filter callback; returns True for all filesr )�src�dstr r r r s c C sN |pt D ]4}z|| ||� W n tk r4 Y qY qX dS qtd| ��dS )a� 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. Nz!Not a recognized archive type: %s)r r )�filename�extract_dir�progress_filterZdriversZdriverr r r r s �c C s� t j�| �std| ��| d|fi}t �| �D ]�\}}}|| \}}|D ],} || d t j�|| �f|t j�|| �<