Repository URL to install this package:
|
Version:
0.1.3 ▾
|
odigos
/
etc
/
odigos-vmagent
/
instrumentations
/
python
/
setuptools
/
__pycache__
/
archive_util.cpython-311.pyc
|
|---|
§
O>g¤ ã óÆ d Z ddlZddlZddlZddlZddlZddlZddlmZ ddl m
Z
g d¢Z G d de
¦ « Zd Z
e
dfd
Ze
fdZe
fdZe
fd
Zd Zd Ze
fdZeeefZdS )z/Utilities for extracting common archive formatsé Né )Úensure_directory)ÚDistutilsError)Úunpack_archiveÚunpack_zipfileÚunpack_tarfileÚdefault_filterÚUnrecognizedFormatÚextraction_driversÚunpack_directoryc ó e Zd ZdZdS )r
z#Couldn't recognize the archive typeN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó ú>/tmp/pip-target-qlpkiub5/lib/python/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 ó~ |pt D ]"} || ||¦ « dS # t $ r Y w xY wt d| z ¦ « )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 " su ð* Ð/Õ/ð Qð Qð ØF8[¨/Ñ:Ô:Ð:ð
FFøõ "ð ð ð ØHð øøøõ
!Ð!DÀxÑ!OÑPÔPÐPs
*©*c ó| t j | ¦ « st d| z ¦ « | d|fi}t j | ¦ « D ]ï\ }}}|| \ }}|D ]K} || z dz t j || ¦ « f|t j || ¦ « <