File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/setuptools/_distutils/__pycache__/archive_util.cpython-310.pyc
Back
o ;j$! � @ s� d Z ddlmZ ddlZddlmZmZ zddlZW n ey% dZY nw ddl m Z ddlmZ ddl mZ dd lmZ zdd lmZ W n eyQ dZY nw zddlmZ W n eye dZY nw dd � Zdd� Z d8d9dd�Z d:d;d d!�Zed"gd#fed$gd%fed&gd'fed(gd)fed*gd+feg d,fd-�Zd.d/� Ze d<d=d3d4��Ze d>d?d6d4��Z d<d@d7d4�ZdS )Azodistutils.archive_util Utility functions for creating archive files (tarballs, zip files, that sort of thing).� )�annotationsN)�Literal�overload� )�log)�mkpath)�DistutilsExecError)�spawn)�getpwnam)�getgrnamc C �L t du s| du r dS zt | �}W n ty d}Y nw |dur$|d S dS )z"Returns a gid, given a group name.N� )r �KeyError��name�result� r �V/opt/saltstack/salt/lib/python3.10/site-packages/setuptools/_distutils/archive_util.py�_get_gid! � �r c C r )z"Returns an uid, given a user name.Nr )r r r r r r �_get_uid. r r �gzipF� base_name�str�base_dir�str | os.PathLike[str]�compress�%Literal['gzip', 'bzip2', 'xz'] | None�verbose�bool�owner� str | None�group�returnc s� ddddd�}dddd �}|d ur||� � vrtd��| d }||�|d�7 }ttj�|�� d d l} t� d� t ���t��� � ���fdd�} | �|d|| � ��}z|j || d� W |�� |S |�� w )a� Create a (possibly compressed) tar file from all the files under 'base_dir'. 'compress' must be "gzip" (the default), "bzip2", "xz", or None. '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&