File manager - Edit - /home/newsbmcs.com/public_html/static/img/logo/pep517.zip
Back
PK ��Z;ϸFi i dirtools.pynu �[��� import os import io import contextlib import tempfile import shutil import errno import zipfile @contextlib.contextmanager def tempdir(): """Create a temporary directory in a context manager.""" td = tempfile.mkdtemp() try: yield td finally: shutil.rmtree(td) def mkdir_p(*args, **kwargs): """Like `mkdir`, but does not raise an exception if the directory already exists. """ try: return os.mkdir(*args, **kwargs) except OSError as exc: if exc.errno != errno.EEXIST: raise def dir_to_zipfile(root): """Construct an in-memory zip file for a directory.""" buffer = io.BytesIO() zip_file = zipfile.ZipFile(buffer, 'w') for root, dirs, files in os.walk(root): for path in dirs: fs_path = os.path.join(root, path) rel_path = os.path.relpath(fs_path, root) zip_file.writestr(rel_path + '/', '') for path in files: fs_path = os.path.join(root, path) rel_path = os.path.relpath(fs_path, root) zip_file.write(fs_path, rel_path) return zip_file PK ��Z��.� � ! __pycache__/check.cpython-310.pycnu �[��� o �7]h� � @ s� d Z ddlZddlZddlZddlZddlmZmZ ddl Z ddl mZ ddlZddl Z ddlmZ ddlZddlmZ ddlmZmZ dd lmZ dd lmZ e�e�Zdd� Zd d� Zdd� Zddd�Z ddddd�Z!dd� Z"edkrze � dS dS )zHCheck a project and backend by attempting to build using PEP 517 hooks. � N)�isfile�join)�CalledProcessError)�mkdtemp� )�enable_colourful_output)�TOMLDecodeError� toml_load)�BuildEnvironment)�Pep517HookCallerc C �@ t � ��}z|�|� t�d� W n ty& t�d� Y W d � dS w z | �i �}t�d|� W n tyK tjddd� Y W d � dS w z|�|� t�d� W n tym t�d � Y W d � dS w t� }t�d |� z�z| � |i �}t�d|� W n ty� tjddd� Y W t �|� W d � dS w |�d �s�t�d|� W t �|� W d � dS t ||�}t|�r�t�d|� nt�d|� W t �|� W d � dS t�|�r�t�d� nt�d� W t �|� W d � dS W t �|� nt �|� w W d � dS 1 �sw Y d S )N�#Installed static build dependencies�+Failed to install static build dependenciesF�Got build requires: %s�'Failure in get_requires_for_build_sdistT��exc_info�$Installed dynamic build dependencies�,Failed to install dynamic build dependencieszTrying to build sdist in %szbuild_sdist returned %rzFailure in build_sdistz.tar.gzz*Filename %s doesn't have .tar.gz extension�Output file %s exists�Output file %s does not existzOutput file is a tar filezOutput file is not a tar file)r �pip_install�log�infor �error�get_requires_for_build_sdist� Exceptionr �build_sdist�shutil�rmtree�endswith�pjoinr �tarfile� is_tarfile��hooks�build_sys_requires�env�reqs�td�filename�path� r, �:/usr/lib/python3/dist-packages/pip/_vendor/pep517/check.py�check_build_sdist sz � � � � � � % � , �-&�r. c C r )Nr r Fr r Tr r r zTrying to build wheel in %szbuild_wheel returned %rzFailure in build_wheelz.whlz'Filename %s doesn't have .whl extensionr r zOutput file is a zip filezOutput file is not a zip file)r r r r r r �get_requires_for_build_wheelr r �build_wheelr r r r! r �zipfile� is_zipfiler$ r, r, r- �check_build_wheelP sv � � � � � $ � + �,&�r3 c C s� t | d�}t|�rt�d� nt�d� dS z2t�|d��}t|�}W d � n1 s,w Y |d }|d }|d }|�d �}t�d � W n t t fy[ tjddd � Y dS w t| ||�}t||�} t ||�} | sst�d� | szt�d� | S )Nzpyproject.tomlzFound pyproject.tomlzMissing pyproject.tomlF�rbzbuild-system�requiresz build-backendzbackend-pathzLoaded pyproject.tomlzInvalid pyproject.tomlTr z%Sdist checks failed; scroll up to seezWheel checks failed)r! r r r r �io�openr �getr �KeyErrorr r. r3 �warning)� source_dir� pyproject�f�pyproject_data�buildsysr5 �backend�backend_pathr% �sdist_ok�wheel_okr, r, r- �check� s4 � � rD c C sl t �d� t�� }|jddd� |�| �}t� t|j�}|r(t t dd�� d S t t dd�� t�d � d S ) NzQpep517.check is deprecated. Consider switching to https://pypi.org/project/build/r; z%A directory containing pyproject.toml)�helpz Checks passed�greenz Checks failed�redr ) r r: �argparse�ArgumentParser�add_argument� parse_argsr rD r; �print�ansi�sys�exit)�argv�ap�args�okr, r, r- �main� s � rT z[0mz[1mz[31mz[32m)�reset�boldrG rF c C s4 t jdkrtj�� rt| t| � td S t| �S )N�ntrU )�os�namerN �stdout�isatty� ansi_codes�str)�s�attrr, r, r- rM � s rM �__main__)N)#�__doc__rH r6 �loggingrX �os.pathr r r! r � subprocessr rN r"