U ÀÒ.e= ã @ sì d Z ddlZddlZddlZddlmZmZ ddlm Z m Z ddlZddl mZ ddlZddlZddlmZ ddlZddlmZ dd lmZ dd lmZ e e¡Zdd„ Zd d„ Zdd„ Zddd„Z dddddœZ!dd„ Z"edkrèe ƒ dS )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 ƒ ö}z| |¡ t d¡ W n* tk rL t d¡ Y W 5 Q R £ dS X z| i ¡}t d|¡ W n. tk r– tjddd Y W 5 Q R £ dS X z| |¡ t d¡ W n* tk rÚ t d ¡ Y W 5 Q R £ dS X tƒ }t d |¡ zôz| |i ¡}t d|¡ W n4 tk r@ tjddd Y W ¢²W 5 Q R £ dS X | d ¡slt d|¡ W ¢†W 5 Q R £ dS t ||ƒ}t|ƒrŽt d|¡ nt d|¡ W ¢FW 5 Q R £ dS t |¡rÄt d¡ nt d¡ W ¢W 5 Q R £ dS W 5 t |¡ X W 5 Q R £ dS Q R X 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 ÚerrorZget_requires_for_build_sdistÚ Exceptionr ÚshutilÚrmtreeZbuild_sdistÚendswithÚpjoinr ÚtarfileZ is_tarfile©ÚhooksZbuild_sys_requiresÚenvZreqsZtdÚfilenameÚpath© r% ú