AlkantarClanX12

Your IP : 3.15.6.140


Current Path : /proc/self/root/usr/lib64/python3.8/distutils/__pycache__/
Upload File :
Current File : //proc/self/root/usr/lib64/python3.8/distutils/__pycache__/archive_util.cpython-38.opt-2.pyc

U

e5d|!�@s@ddlZddlmZddlZzddlZWnek
r@dZYnXddlmZddlm	Z	ddl
mZddlm
Z
zddlmZWnek
r�dZYnXzddlmZWnek
r�dZYnXd	d
�Zdd�Zd"dd�Zd#dd�Zedgdfedgdfedgdfedgdfedgdfegdfd�Zdd�Zd$d d!�ZdS)%�N)�warn)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamcCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdS�N�)r�KeyError��name�result�r�./usr/lib64/python3.8/distutils/archive_util.py�_get_gids
rcCsNtdks|dkrdSzt|�}Wntk
r8d}YnX|dk	rJ|dSdSr	)rrrrrr�_get_uid+s
r�gzipcs.dddddd�}dddd	d
�}|dk	r:||��kr:td��|d}	|d
krZ|	|�|d�7}	ttj�|	�|d�ddl}
t�	d�t
���t�������fdd�}|s�|
�|	d||�}z|j||d�W5|�
�X|d
k�r*tdt�|	||}
tjdk�r||	|
g}n
|d|	g}t||d�|
S|	S)NZgz�bz2�xz�)r�bzip2rN�compressz.gzz.bz2z.xzz.Z)rrrrzKbad value for 'compress': must be None, 'gzip', 'bzip2', 'xz' or 'compress'z.tarr��dry_runrzCreating tar archivecs,�dk	r�|_�|_�dk	r(�|_�|_|S�N)�gidZgname�uid�uname)Ztarinfo�r�group�ownerrrr�_set_uid_gidasz"make_tarball.<locals>._set_uid_gidzw|%s)�filterz'compress' will be deprecated.Zwin32z-f)�keys�
ValueError�getr�os�path�dirname�tarfiler�inforr�open�close�addr�PendingDeprecationWarning�sys�platformr)�	base_name�base_dirr�verboserr!r Ztar_compressionZcompress_extZarchive_namer*r"�tarZcompressed_name�cmdrrr�make_tarball7sB���
	



r7c
Cs�|d}ttj�|�|d�tdkrp|r.d}nd}ztd|||g|d�Wn tk
rjtd|��YnX�n8t�d||�|�s�ztj	|dtj
d	�}Wn&tk
r�tj	|dtjd	�}YnX|��|tj
k�rtj�tj�|d
��}|�||�t�d|�t�|�D]�\}}	}
|	D]6}tj�tj�||d
��}|�||�t�d|��q|
D]B}tj�tj�||��}tj�|��rV|�||�t�d|��qV�qW5QRX|S)Nz.ziprz-rz-rq�zipzkunable to create zip file '%s': could neither import the 'zipfile' module nor find a standalone zip utilityz#creating '%s' and adding '%s' to it�w)Zcompressionrzadding '%s')rr'r(r)�zipfilerrrr+ZZipFileZZIP_DEFLATED�RuntimeErrorZ
ZIP_STORED�curdir�normpath�join�write�walk�isfile)r2r3r4rZzip_filenameZ
zipoptionsr8r(�dirpathZdirnames�	filenamesr
rrr�make_zipfilesV	�
���
�rD)rrzgzip'ed tar-file)rrzbzip2'ed tar-file)rrzxz'ed tar-file)rrzcompressed tar file)rNzuncompressed tar filezZIP file)ZgztarZbztarZxztarZztarr5r8cCs|D]}|tkr|SqdSr)�ARCHIVE_FORMATS)Zformats�formatrrr�check_archive_formats�s
rGc
Cs�t��}|dk	r6t�d|�tj�|�}|s6t�|�|dkrDtj}d|i}	zt|}
Wn t	k
rxt
d|��YnX|
d}|
dD]\}}
|
|	|<q�|dkr�||	d<||	d<z|||f|	�}W5|dk	r�t�d	|�t�|�X|S)
Nzchanging into '%s'rzunknown archive format '%s'r�r8r!r zchanging back to '%s')r'�getcwdr�debugr(�abspath�chdirr<rErr%)r2rFZroot_dirr3r4rr!r Zsave_cwd�kwargsZformat_info�func�arg�val�filenamerrr�make_archive�s2

rR)rrrNN)rr)NNrrNN)r'�warningsrr0r:�ImportErrorZdistutils.errorsrZdistutils.spawnrZdistutils.dir_utilrZ	distutilsr�pwdrZgrprrrr7rDrErGrRrrrr�<module>sL


�
H
=




�	
�