U ÀÒ.e=ã@sìdZddlZddlZddlZddlmZmZddlm Z m Z ddl Z ddl mZddlZddlZddlmZddlZddlmZdd lmZdd lmZe e¡Zd d „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 Cstƒö}z| |¡t d¡Wn*tk rLt d¡YW5QR£dSXz| i¡}t d|¡Wn.tk r–tjdddYW5QR£dSXz| |¡t d¡Wn*tk rÚt d ¡YW5QR£dSXtƒ}t d |¡zôz|  |i¡}t d |¡Wn4tk r@tjd ddYW¢²W5QR£dSX|  d ¡slt d|¡W¢†W5QR£dSt ||ƒ}t|ƒrŽt d|¡nt d|¡W¢FW5QR£dSt |¡rÄt d¡nt d¡W¢W5QR£dSW5t   |¡XW5QR£dSQRXdS)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ÚrmtreeZ build_sdistÚendswithÚpjoinrÚtarfileZ is_tarfile©ÚhooksZbuild_sys_requiresÚenvZreqsZtdÚfilenameÚpath©r%ús6      98" ü