python (3.11.7)

(root)/
lib/
python3.11/
site-packages/
setuptools/
__pycache__/
archive_util.cpython-311.pyc

*edZddlZddlZddlZddlZddlZddlZddlmZddl	m
Z
gdZGddeZd	Z
e
dfd
Ze
fdZe
fdZe
fd
ZdZdZe
fdZeeefZdS)z/Utilities for extracting common archive formatsN)DistutilsError)ensure_directory)unpack_archiveunpack_zipfileunpack_tarfiledefault_filterUnrecognizedFormatextraction_driversunpack_directoryceZdZdZdS)r
z#Couldn't recognize the archive typeN)__name__
__module____qualname____doc__Y/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/site-packages/setuptools/archive_util.pyr
r
s----rr
c|S)z@The default progress/filter callback; returns True for all filesr)srcdsts  rr	r	sJrc~|ptD]"}	||||dS#t$rYwxYwtd|z)aUnpack `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)rr
)filenameextract_dirprogress_filterdriversdrivers     rrrsy.//



	F8[/:::
FF"			H	
!/(:

	
s

**c|tj|std|z|d|fi}tj|D]\}}}||\}}|D]K}	||	zdztj||	f|tj||	<L|D]}
tj||
}|||
z|}|s4t
|tj||
}
tj|
|tj	|
|dS)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
walkjoinrshutilcopyfilecopystat)rrrpathsbasedirsfilesrrdftargets            rrr@sY
7==""E !88!CDDD	2{#
E WX..
'
'dE;S	O	OA+.7S="',,sA:N:N+NE"',,tQ''((		'		'AW\\#q))F$_S1Wf55F
V$$$T1%%AOAv&&&OAv&&&&		'	
'
'rctj|st|dtj|5}t	|||ddddS#1swxYwYdS)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)rrrzs    rrr[sh''G 888!EFFF		"	"=aA{O<<<==================sAA!Acj|D]}|j}|dsd|dvr7t	jj|g|dR}|||}|sp|drt|nft||	|j}t|d5}||dddn#1swxYwY|jdz	}|rt	j
||dS)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%endswithrreadopenwrite
external_attrchmod)	zipfile_objrrinfonamer/datar.unix_attributess	         rr4r4js
$$&&..}??3	44::c??#:#:k<DJJsOO<<< v..	==	V$$$$
V$$$##DM22Dfd##
q

















,2	.HV_----..s#DD		D		c||s|r|j}|rBtj|j}tj||}tj|}||}|(|||duo'|	p|
}|r|Std)z;Resolve any links and extract link targets as normal files.NzGot unknown file type)islnkissymlinkname	posixpathdirnamerEr%normpath
_getmemberisfiler#LookupError)tar_objtar_member_objlinkpathr*is_file_or_dirs     r_resolve_tar_file_or_dirrVs

$  ""%&4&:&:&<&<%!*!!	4$^%899D ~dH55H )(33H ++H55
$  ""%&4&:&:&<&<%	d"	<				 	 	:N$8$8$:$:
-
.
..rc#Kd|_tj|5|D]}|j}|dsd|dvr6t
jj|g|dR}	t||}n#t$rY~wxYw|||}|s|tjr
|dd}||fV	ddddS#1swxYwYdS)z1Emit member-destination pairs from a tar archive.cdS)Nr)argss r<lambda>z _iter_open_tar.<locals>.<lambda>s$rr r7N)
chown
contextlibclosingrEr;r<r!r"r%rVrQr=sep)rRrrmemberrE
prelim_dst	final_dsts       r_iter_open_tarrcs}'&GM		G	$	$$$	$	$F;Ds##
ttzz#'>'>kDDJJsOODDDJ
1'6BB



(j99I
!!"&))
+%crcN	)#####)	$$$$$$$$$$$$$$$$$$$s7A#C1BC1
B!C1 B!!AC11C58C5c	tj|}n*#tj$r}t|d|d}~wwxYwt	|||D]1\}}	|||#tj$rY.wxYwdS)zUnpack tar/tar.gz/tar.bz2 `filename` to `extract_dir`

    Raises ``UnrecognizedFormat`` if `filename` is not a tarfile (as determined
    by ``tarfile.open()``).  See ``unpack_archive()`` for an explanation
    of the `progress_filter` argument.
    z- is not a compressed or uncompressed tar fileNT)tarfiler?TarErrorr
rc_extract_memberExtractError)rrrtarobjer`rbs       rrrsh'' AIK

	
,K		""695555#			D	4s">9>A//BB)rr1rer!r&rLr]distutils.errorsr_pathr__all__r
r	rrrr4rVrcrrrrr<module>rnsn55				



++++++######........0>!
!
!
!
H=K''''6;I====CQ....<///*$$$:;I6&~~Er