관리-도구
편집 파일: archive_util.cpython-310.opt-2.pyc
o 6��f|! � @ sD d dl Z d dlmZ d dlZzd dlZW n ey dZY nw d dlmZ d dlm Z d dl mZ d dlm Z zd dlmZ W n eyL dZY nw zd dlmZ W n ey` dZY nw d d � Zdd� Z d"dd�Zd#dd�Zedgdfedgdfedgdfedgdfedgdfeg dfd�Zdd� Z d$d d!�ZdS )%� N)�warn)�DistutilsExecError)�spawn)�mkpath)�log)�getpwnam)�getgrnamc C �N t d u s | d u rd S zt | �}W n ty d }Y nw |d ur%|d S d S �N� )r �KeyError��name�result� r �=/opt/alt/python310/lib64/python3.10/distutils/archive_util.py�_get_gid � �r c C r r )r r r r r r �_get_uid+ r r �gzipc s4 dddddd�}dddd d �}|d ur||� � vrtd��| d } |d kr.| |�|d�7 } ttj�| �|d� dd l} t� d� t ���t��� � ���fdd�}|sq| �| d|| �}z |j ||d� W |�� n|�� w |d kr�tdt� | || } tjdkr�|| | g}n|d| g}t||d� | S | S )NZgz�bz2�xz� )r �bzip2r N�compressz.gzz.bz2z.xzz.Z)r r r r zKbad 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)�gidZgname�uid�uname)Ztarinfo�r �group�ownerr r r �_set_uid_gida s z"make_tarball.<locals>._set_uid_gidzw|%s)�filterz'compress' will be deprecated.Zwin32z-f)�keys� ValueError�getr �os�path�dirname�tarfiler �infor r �open�add�closer �PendingDeprecationWarning�sys�platformr )� base_name�base_dirr �verboser r# r"