£Á°èZ¨Ä…–K§‚«“ô4“ÒÙ´dîfUÙÃÅ WKbyÊ¦•êŽ…È®FÒ¿ÊÎóCozá¬S@6{Í:›œêZÌ:Š•_%:¢¾¾~;‘Ã~èŠ©ÊÇí`ÔÑ©úë™µ'5I¿fš×WO%ø9¾«¾DK|€ùÍD”Ýs]nHÕ¶ê×Ó¼ãžªéUWŸÈË%DÒÕ¬ï‘]/Åcx  ‰ï2ß]ä6G[]S£ÔÏ¯rs{úëóµmÒï#UQxo·õÞCe]"±/aÙ&Eã4ú9Jé_ÞåëdãöKë)AÞ                  ¯¹ægƒÛowÐø^d™ý½ßB7áyMä9ÜÖUã
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<html>
B
    ReI                 @   s   d Z ddlZddlZddlZddlmZmZ ddlm	Z	m
Z ddlZddlmZ ddlZddlZddlmZ ddlZddlmZ dd	lmZ dd
lmZ eeZdd Zdd Zdd ZdddZ dddddZ!dd Z"edkre   dS )zHCheck a project and backend by attempting to build using PEP 517 hooks.
    N)isfilejoin)TomlDecodeErrorload)CalledProcessError)mkdtemp   )enable_colourful_output)BuildEnvironment)Pep517HookCallerc          
   C   s  t  }y|| td W n tk
r@   td dS X y| i }td| W n" tk
r~   tjddd dS X y|| td W n tk
r   td	 dS X t }td
| zy| 	|i }td| W n$ tk
r   tjddd dS X |
ds*td| dS t||}t|rLtd| ntd| dS t|rttd ntd dS W d t| X dS Q R X d S )Nz#Installed static build dependenciesz+Failed to install static build dependenciesFzGot build requires: %sz'Failure in get_requires_for_build_sdistT)exc_infoz$Installed dynamic build dependenciesz,Failed to install dynamic build dependencieszTrying to build sdist in %szbuild_sdist returned %rzFailure in build_sdistz.tar.gzz*Filename %s doesn't have .tar.gz extensionzOutput file %s existszOutput file %s does not existzOutput file is a tar filezOutput file is not a tar file)r
   pip_installloginfor   errorget_requires_for_build_sdist	Exceptionr   build_sdistendswithpjoinr   tarfile
is_tarfileshutilrmtree)hooksbuild_sys_requiresenvreqstdfilenamepath r!   /builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_vendor/pep517/check.pycheck_build_sdist   sV    








r#   c          
   C   s  t  }y|| td W n tk
r@   td dS X y| i }td| W n" tk
r~   tjddd dS X y|| td W n tk
r   td	 dS X t }td
| zy| 	|i }td| W n$ tk
r   tjddd dS X |
ds*td| dS t||}t|rLtd| ntd| dS t|rttd ntd dS W d t| X dS Q R X d S )Nz#Installed static build dependenciesz+Failed to install static build dependenciesFzGot build requires: %sz'Failure in get_requires_for_build_sdistT)r   z$Installed dynamic build dependenciesz,Failed to install dynamic build dependencieszTrying to build wheel in %szbuild_wheel returned %rzFailure in build_wheelz.whlz'Filename %s doesn't have .whl extensionzOutput file %s existszOutput file %s does not existzOutput file is a zip filezOutput file is not a zip file)r
   r   r   r   r   r   get_requires_for_build_wheelr   r   build_wheelr   r   r   zipfile
is_zipfiler   r   )r   r   r   r   r   r   r    r!   r!   r"   check_build_wheelO   sT    








r(   c          	   C   s   t | d}t|rtd ntd dS yLt|}t|}W d Q R X |d }|d }|d }|d}td	 W n& tt	fk
r   tjd
dd dS X t
| ||}t||}	t||}
|	std |
std |	S )Nzpyproject.tomlzFound pyproject.tomlzMissing pyproject.tomlFzbuild-systemrequireszbuild-backendzbackend-pathzLoaded pyproject.tomlzInvalid pyproject.tomlT)r   z%Sdist checks failed; scroll up to seezWheel checks failed)r   r   r   r   r   open	toml_loadgetr   KeyErrorr   r#   r(   warning)
source_dir	pyprojectfZpyproject_dataZbuildsysr)   backendbackend_pathr   Zsdist_okZwheel_okr!   r!   r"   check   s0    







r4   c             C   s`   t  }|jddd || }t  t|j}|rDttdd nttdd t	
d d S )	Nr/   z%A directory containing pyproject.toml)helpzChecks passedgreenzChecks failedredr   )argparseArgumentParseradd_argument
parse_argsr	   r4   r/   printansisysexit)argvZapargsokr!   r!   r"   main   s    

rC   z[0mz[1mz[31mz[32m)resetZboldr7   r6   c             C   s8   t jdkr,tj r,t| t|  td  S t| S d S )NntrD   )osnamer>   stdoutisatty
ansi_codesstr)sattrr!   r!   r"   r=      s    r=   __main__)N)#__doc__r8   loggingrF   os.pathr   r   r   Zpip._vendor.tomlr   r   r+   r   
subprocessr   r>   r   tempfiler   r&   Zcolorlogr	   Zenvbuildr
   wrappersr   	getLogger__name__r   r#   r(   r4   rC   rJ   r=   r!   r!   r!   r"   <module>   s4   
98"
