Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/check.pyc

ó
“tÆ_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(tTomlDecodeErrortload(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((sI/opt/alt/python35/lib/python3.5/site-packages/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((sI/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/check.pytcheck_build_wheelOsT






	

cCs)t|dƒ}t|ƒr+tjdƒntjdƒtSy_t|ƒ}t|ƒ}WdQX|d}|d}|d}|jdƒ}tjdƒWn+t	t
fk
rÈtjd	d
tƒtSXt|||ƒ}t
||ƒ}	t||ƒ}
|	stjdƒn|
s%tjdƒn|	S(
Nspyproject.tomlsFound pyproject.tomlsMissing pyproject.tomlsbuild-systemtrequiress
build-backendsbackend-pathsLoaded pyproject.tomlsInvalid pyproject.tomlR	s%Sdist checks failed; scroll up to seesWheel checks failed(RRRRR
Rtopent	toml_loadtgetRtKeyErrorRRR R%twarning(t
source_dirt	pyprojecttftpyproject_datatbuildsysR&tbackendtbackend_pathRtsdist_oktwheel_ok((sI/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/check.pytcheck‡s0



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_argsRR5R,tansitsystexit(targvtaptargstok((sI/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/check.pytmain©sstresetstboldsR8sR7cCsFtjdkr8tjjƒr8t|t|ƒtdSt|ƒSdS(NtntRE(tostnameR>tstdouttisattyt
ansi_codeststr(tstattr((sI/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/check.pyR=Ãst__main__($t__doc__R9tloggingRHtos.pathRRRtpip._vendor.tomlRRR(Rt
subprocessRR>RttempfileRR#tcolorlogRtenvbuildRtwrappersRt	getLoggert__name__RR R%R5tNoneRDRLR=(((sI/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/check.pyt<module>s6	9	8	"
	
Back to Directory File Manager