????

Your IP : 216.73.216.152


Current Path : /lib/python2.7/site-packages/pip/_vendor/pep517/
Upload File :
Current File : //lib/python2.7/site-packages/pip/_vendor/pep517/check.pyc

�
}�\]c@sQdZddlZddlZddlZddlmZmZddlm	Z	m
ZddlZddl
mZddlZddlZddlmZddlZddlmZdd	lmZdd
lmZeje�Zd�Zd�Zd
�Zdd�Z!idd6dd6dd6dd6Z"d�Z#edkrMe!�ndS(sHCheck a project and backend by attempting to build using PEP 517 hooks.
i����N(tisfiletjoin(t	TomlErrortload(tCalledProcessError(tmkdtempi(tenable_colourful_output(tBuildEnvironment(tPep517HookCallerc	Cs�t���}y|j|�tjd�Wntk
rKtjd�tSXy#|ji�}tjd|�Wn%tk
r�tjddt	�tSXy|j|�tjd�Wntk
r�tjd�tSXt
�}tjd|�z�y&|j|i�}tjd	|�Wn%tk
r@tjd
dt	�tSX|jd�sdtjd|�tSt
||�}t|�r�tjd
|�ntjd|�tStj|�r�tjd�ntjd�tSWdtj|�Xt	SWdQXdS(Ns#Installed static build dependenciess+Failed to install static build dependenciessGot build requires: %ss'Failure in get_requires_for_build_sdisttexc_infos$Installed dynamic build dependenciess,Failed to install dynamic build dependenciessTrying to build sdist in %ssbuild_sdist returned %rsFailure in build_sdists.tar.gzs*Filename %s doesn't have .tar.gz extensionsOutput file %s existssOutput file %s does not existsOutput file is a tar filesOutput file is not a tar file(Rtpip_installtlogtinfoRterrortFalsetget_requires_for_build_sdistt	ExceptiontTrueRtbuild_sdisttendswithtpjoinRttarfilet
is_tarfiletshutiltrmtree(thookstbuild_sys_requirestenvtreqsttdtfilenametpath((s7/tmp/pip-install-ewDPok/pip/pip/_vendor/pep517/check.pytcheck_build_sdistsV






	


c	Cs�t���}y|j|�tjd�Wntk
rKtjd�tSXy#|ji�}tjd|�Wn%tk
r�tjddt	�tSXy|j|�tjd�Wntk
r�tjd�tSXt
�}tjd|�z�y&|j|i�}tjd	|�Wn%tk
r@tjd
dt	�tSX|jd�sdtjd|�tSt
||�}t|�r�tjd
|�ntjd|�tStj|�r�tjd�ntjd�tSWdtj|�Xt	SWdQXdS(Ns#Installed static build dependenciess+Failed to install static build dependenciessGot build requires: %ss'Failure in get_requires_for_build_sdistR	s$Installed dynamic build dependenciess,Failed to install dynamic build dependenciessTrying to build wheel in %ssbuild_wheel returned %rsFailure in build_wheels.whls'Filename %s doesn't have .whl extensionsOutput file %s existssOutput file %s does not existsOutput file is a zip filesOutput file is not a zip file(RR
RRRR
Rtget_requires_for_build_wheelRRRtbuild_wheelRRRtzipfilet
is_zipfileRR(RRRRRRR((s7/tmp/pip-install-ewDPok/pip/pip/_vendor/pep517/check.pytcheck_build_wheelOsT






	

c
Cst|d�}t|�r+tjd�ntjd�tSyPt|��}t|�}WdQX|d}|d}|d}tjd�Wn+tt	fk
r�tjdd	t
�tSXt||�}t||�}t
||�}	|s�tjd
�n|	stjd�n|S(Nspyproject.tomlsFound pyproject.tomlsMissing pyproject.tomlsbuild-systemtrequiress
build-backendsLoaded pyproject.tomlsInvalid pyproject.tomlR	s%Sdist checks failed; scroll up to seesWheel checks failed(RRRRR
Rtopent	toml_loadRtKeyErrorRRR R%twarning(
t
source_dirt	pyprojecttftpyproject_datatbuildsysR&tbackendRtsdist_oktwheel_ok((s7/tmp/pip-install-ewDPok/pip/pip/_vendor/pep517/check.pytcheck�s.



cCsztj�}|jddd�|j|�}t�t|j�}|r[tdd�GHntdd�GHtj	d�dS(	NR+thelps%A directory containing pyproject.tomls
Checks passedtgreens
Checks failedtredi(
targparsetArgumentParsertadd_argumentt
parse_argsRR3R+tansitsystexit(targvtaptargstok((s7/tmp/pip-install-ewDPok/pip/pip/_vendor/pep517/check.pytmain�sstresetstboldsR6sR5cCsFtjdkr8tjj�r8t|t|�tdSt|�SdS(NtntRC(tostnameR<tstdouttisattyt
ansi_codeststr(tstattr((s7/tmp/pip-install-ewDPok/pip/pip/_vendor/pep517/check.pyR;�st__main__($t__doc__R7tloggingRFtos.pathRRRtpip._vendor.pytomlRRR(Rt
subprocessRR<RttempfileRR#tcolorlogRtenvbuildRtwrappersRt	getLoggert__name__RR R%R3tNoneRBRJR;(((s7/tmp/pip-install-ewDPok/pip/pip/_vendor/pep517/check.pyt<module>s6	9	8	!