File manager - Edit - /usr/local/CyberCP/lib/python3.10/site-packages/setuptools/tests/integration/__pycache__/helpers.cpython-310.pyc
Back
o �h� � @ s` d Z ddlZddlZddlZddlmZ ddlmZ d dd�ZG dd� d�Z d d � Z dd� ZdS )z�Reusable functions and classes for different types of integration tests. For example ``Archive`` can be used to check the contents of distribution built with setuptools, and ``run`` will always try to be as verbose as possible to facilitate debugging. � N��Path)�ZipFilec C sz t j| dddi tj�|p i �d�}|jd |j }td� td| � d|j� d|� �� |jd kr2|S t �|j| |j|j��) NT�utf-8)�capture_output�text�encoding�env� z<~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~z Command: z return code: z r ) � subprocess�run�os�environ�stdout�stderr�print� returncode�CalledProcessError)�cmdr �r�out� r �W/usr/local/CyberCP/lib/python3.10/site-packages/setuptools/tests/integration/helpers.pyr s � r c @ s0 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd S )�Archivez5Compatibility layer for ZipFile/Info and TarFile/Infoc C sH || _ |�d�rt�|d�| _d S |�d�rt|�| _d S t|� d���)Nztar.gz�r:gz�zipz# doesn't seem to be a zip or tar.gz)� _filename�endswith�tarfile�open�_objr � ValueError)�self�filenamer r r �__init__&