a0bi S r SSKrSSKrSSKrSSKrSSKrSSKrSSKJr SSK J
r
/ SQr " S S\5 rS r
\
S4S
jr\
4S jr\
4S jr\
4S
jrS rS r\
4S jr\\\4rg)z/Utilities for extracting common archive formats N)DistutilsError )ensure_directory)unpack_archiveunpack_zipfileunpack_tarfiledefault_filterUnrecognizedFormatextraction_driversunpack_directoryc \ rS rSrSrSrg)r
z#Couldn't recognize the archive type N)__name__
__module____qualname____firstlineno____doc____static_attributes__r ڐ/builddir/build/BUILDROOT/alt-python313-setuptools-69.0.2-3.el8.x86_64/opt/alt/python313/lib/python3.13/site-packages/setuptools/archive_util.pyr
r
s -r r
c U$ )z@The default progress/filter callback; returns True for all filesr )srcdsts r r r s Jr c U=( d [ H
n U" XU5 g [ SU - 5 e! [ a M, f = f)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
)filenameextract_dirprogress_filterdriversdrivers r r r ! sR * /// 8/:
0 !!Dx!OPP " s /
==c [ R R U 5 ( d [ SU - 5 eU SU40n[ R " U 5 H u pEnX4 u pxU HI n Xy- S- [ R R X5 4U[ R R XI5 ' MK U H n
[ R R X5 nU" Xz- U5 nU( d M6 [
U5 [ R R XJ5 n
[ R " X5 [ R " X5 M M g)z"Unpack" a directory, using the same interface as for archives
Raises ``UnrecognizedFormat`` if `filename` is not a directory
z%s is not a directory /N)
ospathisdirr
walkjoinr shutilcopyfilecopystat)r r r pathsbasedirsfilesr r dftargets r r r A s
77=="" !88!CDD 2{#
E WWX.E;A+.7S="'',,s:N+NE"'',,t'( AWW\\#)F$SWf5FV$T%AOOA&OOA& /r c [ R " U 5 ( d [ U < S35 e[ R " U 5 n[ X1U5 SSS5 g! , ( d f g= f)zUnpack zip `filename` to `extract_dir`
Raises ``UnrecognizedFormat`` if `filename` is not a zipfile (as determined
by ``zipfile.is_zipfile()``). See ``unpack_archive()`` for an explanation
of the `progress_filter` argument.
z is not a zip fileN)zipfile
is_zipfiler
ZipFile_unpack_zipfile_obj)r r r zs r r r \ sG h'' 8!EFF "aAO<
# " "s
A
A%c U R 5 GH nUR nUR S5 ( d SUR S5 ; a M= [ R
R " U/UR S5 Q76 nU" XE5 nU( d M~ UR S5 ( a [ U5 OL[ U5 U R UR 5 n[ US5 nUR U5 SSS5 UR S- nU( d GM [ R " XX5 GM g! , ( d f NC= f)zInternal/private API used by other parts of setuptools.
Similar to ``unpack_zipfile``, but receives an already opened :obj:`zipfile.ZipFile`
object instead of a filename.
r# ..wbN )infolistr
startswithsplitr$ r% r( endswithr readopenwrite
external_attrchmod) zipfile_objr r infonamer2 datar1 unix_attributess r r7 r7 k s
$$&}} ??344::c?#:k