/usr/lib/python3.10/distutils/__pycache__
NameSizeModeActions
archive_util.cpython-310.pyc65080644editdlrm
bcppcompiler.cpython-310.pyc64950644editdlrm
ccompiler.cpython-310.pyc330440644editdlrm
cmd.cpython-310.pyc138950644editdlrm
config.cpython-310.pyc35340644editdlrm
core.cpython-310.pyc66030644editdlrm
cygwinccompiler.cpython-310.pyc84560644editdlrm
debug.cpython-310.pyc1970644editdlrm
dep_util.cpython-310.pyc27180644editdlrm
dir_util.cpython-310.pyc61690644editdlrm
dist.cpython-310.pyc339500644editdlrm
errors.cpython-310.pyc49390644editdlrm
extension.cpython-310.pyc69740644editdlrm
fancy_getopt.cpython-310.pyc105770644editdlrm
filelist.cpython-310.pyc98270644editdlrm
file_util.cpython-310.pyc59230644editdlrm
log.cpython-310.pyc22540644editdlrm
msvc9compiler.cpython-310.pyc175090644editdlrm
msvccompiler.cpython-310.pyc147280644editdlrm
spawn.cpython-310.pyc34140644editdlrm
sysconfig.cpython-310.pyc77710644editdlrm
text_file.cpython-310.pyc84160644editdlrm
unixccompiler.cpython-310.pyc72070644editdlrm
util.cpython-310.pyc156360644editdlrm
version.cpython-310.pyc73060644editdlrm
versionpredicate.cpython-310.pyc51340644editdlrm
_msvccompiler.cpython-310.pyc128280644editdlrm
__init__.cpython-310.pyc6210644editdlrm
Edit: /usr/lib/python3.10/distutils/__pycache__/archive_util.cpython-310.pyc (6508B)
o bc|!@sFdZddlZddlmZddlZzddlZWn ey!dZYnwddlmZddl m Z ddl m Z ddl mZzddlmZWn eyMdZYnwzdd lmZWn eyadZYnwd d Zd d Z  d#ddZd$ddZedgdfedgdfedgdfedgdfedgdfegdfdZdd Z  d%d!d"ZdS)&zodistutils.archive_util Utility functions for creating archive files (tarballs, zip files, that sort of thing).N)warn)DistutilsExecError)spawn)mkpath)log)getpwnam)getgrnamcCLtdus|dur dSzt|}Wn tyd}Ynw|dur$|dSdS)z"Returns a gid, given a group name.N)rKeyErrornameresultr-/usr/lib/python3.10/distutils/archive_util.py_get_gid  rcCr )z"Returns an uid, given a user name.Nr )rr r rrr_get_uid+rrgzipcs2dddddd}dddd d }|d ur||vrtd |d } |dkr-| ||d7} ttj| |ddd l} t dt t fdd} |sp| | d||} z | j || dW| n| w|dkrtdt| ||} tjdkr|| | g}n|d| g}t||d| S| S)a=Create a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "bzip2", "xz", "compress", or None. ("compress" will be deprecated in Python 3.2) 'owner' and 'group' can be used to define an owner and a group for the archive that is being built. If not provided, the current owner and group will be used. The output tar file will be named 'base_dir' + ".tar", possibly plus the appropriate compression extension (".gz", ".bz2", ".xz" or ".Z"). Returns the output filename. gzbz2xz)rbzip2rNcompressz.gzz.bz2z.xzz.Z)rrrrNzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarrdry_runrzCreating tar archivecs,dur |_|_dur|_|_|S)N)gidgnameuiduname)tarinforgroupownerrrr _set_uid_gidasz"make_tarball.._set_uid_gidzw|%s)filterz'compress' will be deprecated.win32z-f)keys ValueErrorgetrospathdirnametarfilerinforropenaddcloserPendingDeprecationWarningsysplatformr) base_namebase_dirrverboserr$r#tar_compression compress_ext archive_namer.r%tarcompressed_namecmdrr"r make_tarball7sB        r?c Cs|d}ttj||dtdur4|rd}nd}z td|||g|dW|Sty3td|wtd|||sz tj |d tj d }Wnt yZtj |d tj d }Ynw|o|tj krztjtj|d }|||td |t|D]D\}} } | D]} tjtj|| d }|||td |q| D]} tjtj|| }tj|r|||td |qqWd|S1swY|S) avCreate a zip file from all the files under 'base_dir'. The output zip file will be named 'base_name' + ".zip". Uses either the "zipfile" Python module (if available) or the InfoZIP "zip" utility (if installed and found on the default search path). If neither tool is available, raises DistutilsExecError. Returns the name of the output zip file. z.ziprNz-rz-rqzipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to itw) compressionrz adding '%s')rr+r,r-zipfilerrrr/ZipFile ZIP_DEFLATED RuntimeError ZIP_STOREDcurdirnormpathjoinwritewalkisfile) r6r7r8r zip_filename zipoptionsr@r,dirpathdirnames filenamesr rrr make_zipfilesf  %           rS)rrzgzip'ed tar-file)rrzbzip2'ed tar-file)rrzxz'ed tar-file)rrzcompressed tar file)rNzuncompressed tar filezZIP file)gztarbztarxztarztarr<r@cCs|D] }|tvr |SqdS)zqReturns the first format from the 'format' list that is unknown. If all formats are known, returns None N)ARCHIVE_FORMATS)formatsformatrrrcheck_archive_formatss r[c Cst}|durtd|tj|}|st||dur"tj}d|i} zt|} Wn t y9t d|w| d} | dD]\} } | | | <qB|dkrW|| d<|| d <z| ||fi| }W|durqtd |t||S|durtd |t|ww) aCreate an archive file (eg. zip or tar). 'base_name' is the name of the file to create, minus any format-specific extension; 'format' is the archive format: one of "zip", "tar", "gztar", "bztar", "xztar", or "ztar". 'root_dir' is a directory that will be the root directory of the archive; ie. we typically chdir into 'root_dir' before creating the archive. 'base_dir' is the directory where we start archiving from; ie. 'base_dir' will be the common prefix of all files and directories in the archive. 'root_dir' and 'base_dir' both default to the current directory. Returns the name of the archive file. 'owner' and 'group' are used when creating a tar archive. By default, uses the current owner and group. Nzchanging into '%s'rzunknown archive format '%s'rr@r$r#zchanging back to '%s') r+getcwdrdebugr,abspathchdirrHrXr r))r6rZroot_dirr7r8rr$r#save_cwdkwargs format_infofuncargvalfilenamerrr make_archives<           ri)rrrNN)rr)NNrrNN)__doc__r+warningsrr4rC ImportErrordistutils.errorsrdistutils.spawnrdistutils.dir_utilr distutilsrpwdrgrprrrr?rSrXr[rirrrrsP            H =