HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/cwd/usr/lib/python3/dist-packages/pip/_vendor/pep517/__pycache__/check.cpython-310.pyc
o

@%Ne��@s�dZddlZddlZddlZddlZddlmZmZddl	Z	ddl
mZddlZddl
Z
ddlmZddlZddlmZddlmZmZdd	lmZdd
lmZe�e�Zdd�Zd
d�Zdd�Zddd�Z ddddd�Z!dd�Z"edkrze �dSdS)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�Wnty&t�d�YWd�dSwz
|�i�}t�d|�WntyKtjddd�YWd�dSwz|�|�t�d�Wntymt�d	�YWd�dSwt�}t�d
|�z�z|�	|i�}t�d|�Wnty�tjddd�YWt
�|�Wd�dSw|�d
�s�t�d|�Wt
�|�Wd�dSt
||�}t|�r�t�d|�nt�d|�Wt
�|�Wd�dSt�|�r�t�d�nt�d�Wt
�|�Wd�dSWt
�|�nt
�|�w	Wd�dS1�swYdS)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_sdistsz


�
�

�
�
�
�
%
	�
,

�-&�r.c
Cr)Nr
rFrrTrrrzTrying to build wheel in %szbuild_wheel returned %rzFailure in build_wheelz.whlz'Filename %s doesn't have .whl extensionrrzOutput file is a zip filezOutput file is not a zip file)r
rrrrr�get_requires_for_build_wheelrr�build_wheelrrr r!r�zipfile�
is_zipfiler$r,r,r-�check_build_wheelPsv


�
�

�
�

�
$
	�
+

�,&�r3c	Cs�t|d�}t|�rt�d�nt�d�dSz2t�|d��}t|�}Wd�n1s,wY|d}|d}|d}|�d	�}t�d
�Wnt	t
fy[tjddd
�YdSwt|||�}t||�}	t
||�}
|	sst�d�|
szt�d�|	S)Nzpyproject.tomlzFound pyproject.tomlzMissing pyproject.tomlF�rbzbuild-system�requiresz
build-backendzbackend-pathzLoaded pyproject.tomlzInvalid pyproject.tomlTrz%Sdist checks failed; scroll up to seezWheel checks failed)r!rrrr�io�openr	�getr�KeyErrorrr.r3�warning)�
source_dir�	pyproject�f�pyproject_data�buildsysr5�backend�backend_pathr%�sdist_ok�wheel_okr,r,r-�check�s4


�
�



rDcCslt�d�t��}|jddd�|�|�}t�t|j�}|r(t	t
dd��dSt	t
dd��t�d	�dS)
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)
rr:�argparse�ArgumentParser�add_argument�
parse_argsrrDr;�print�ansi�sys�exit)�argv�ap�args�okr,r,r-�main�s
�

rTzzzz)�reset�boldrGrFcCs4tjdkrtj��rt|t|�tdSt|�S)N�ntrU)�os�namerN�stdout�isatty�
ansi_codes�str)�s�attrr,r,r-rM�srM�__main__)N)#�__doc__rHr6�loggingrX�os.pathrrr!r�
subprocessrrNr"�tempfilerr1�colorlogr�compatrr	�envbuildr
�wrappersr�	getLogger�__name__rr.r3rDrTr\rMr,r,r,r-�<module>s<
98
"�
�