/usr/lib64/python3.9/distutils/__pycache__
Edit: /usr/lib64/python3.9/distutils/__pycache__/archive_util.cpython-39.opt-1.pyc (6587B)
a
´i|! ã @ s> d Z ddlZddlmZ ddlZzddlZW n eyB dZY n0 ddlmZ ddl m
Z
ddlmZ ddl
mZ zddlmZ W n eyš dZY n0 zdd lmZ W n ey dZY n0 d
d„ Zdd
„ Zd#dd„Zd$dd„Zedgdfedgdfedgdfedgdfedgdfeg dfdœZdd „ Zd%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)Úgetgrnamc C sL t du s| du rdS zt | ƒ}W n ty6 d}Y n0 |durH|d S dS )z"Returns a gid, given a group name.Né )r ÚKeyError©ÚnameÚresult© r ú./usr/lib64/python3.9/distutils/archive_util.pyÚ_get_gid s
r c C sL t du s| du rdS zt | ƒ}W n ty6 d}Y n0 |durH|d S dS )z"Returns an uid, given a user name.Nr )r r
r r r r Ú_get_uid+ s
r Úgzipc s6 ddddddœ}dddd d
œ}|dur:|| ¡ vr:tdƒ‚| d
} |dkrZ| | |d¡7 } ttj | ¡|d� ddl}
t d¡ t
ˆƒ‰tˆƒ‰ ‡ ‡‡‡fdd„}|sà|
| d|| ¡}z|j
||d� W | ¡ n
| ¡ 0 |dk�r2tdtƒ | || }
tjdk�r|| |
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.
ÚgzÚbz2ÚxzÚ )r Úbzip2r NÚcompressz.gzz.bz2z.xzz.Z)r r r r NzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr ©Údry_runr zCreating tar archivec s, ˆ d urˆ | _ ˆ| _ˆd ur(ˆ| _ˆ| _| S )N)ÚgidÚgnameÚuidÚuname)Útarinfo©r ÚgroupÚownerr r r Ú_set_uid_gida s z"make_tarball.
._set_uid_gidzw|%s)Úfilterz'compress' will be deprecated.Úwin32z-f)ÚkeysÚ
ValueErrorÚgetr ÚosÚpathÚdirnameÚtarfiler Úinfor r ÚopenÚaddÚcloser ÚPendingDeprecationWarningÚsysÚplatformr )Ú base_nameÚbase_dirr Úverboser r" r! Útar_compressionÚcompress_extÚarchive_namer, r# ÚtarZcompressed_nameÚcmdr r r Úmake_tarball7 sB ÿÿÿ
r<