%PDF- %PDF-
Direktori : /lib/python3/dist-packages/setuptools/__pycache__/ |
Current File : //lib/python3/dist-packages/setuptools/__pycache__/archive_util.cpython-312.pyc |
� _�d� � � � d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m Z g d�Z G d� de� Zd � Z e dfd �Ze fd�Ze fd�Ze fd �Zd� Zd� Ze fd�ZeeefZy)z/Utilities for extracting common archive formats� N)�DistutilsError� )�ensure_directory)�unpack_archive�unpack_zipfile�unpack_tarfile�default_filter�UnrecognizedFormat�extraction_drivers�unpack_directoryc � � e Zd ZdZy)r z#Couldn't recognize the archive typeN)�__name__� __module__�__qualname__�__doc__� � �9/usr/lib/python3/dist-packages/setuptools/archive_util.pyr r s � �-r r c � � |S )z@The default progress/filter callback; returns True for all filesr )�src�dsts r r r s � ��Jr c �r � |xs t D ] } || ||� y t d| z � �# t $ r Y �*w xY w)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_filter�drivers�drivers r r r ! sX � �* �/�/� Q�� ��8�[�/�:� � Q� !�!D�x�!O�P�P�� "� �� �s � *� 6�6c �p � t j j | � st d| z � �| d|fi}t j | � D ]� \ }}}|| \ }}|D ]K } || z dz t j j || � f|t j j || � <