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



t_I@sYdZddlZddlZddlZddlmZmZddlm	Z	m
ZddlZddl
mZddlZddlZddlmZddlZddlmZdd	lmZdd
lmZejeZddZd
dZddZdddZ ddddddddiZ!ddZ"edkrUe dS)zHCheck a project and backend by attempting to build using PEP 517 hooks.
N)isfilejoin)TomlDecodeErrorload)CalledProcessError)mkdtemp)enable_colourful_output)BuildEnvironment)Pep517HookCallerc0Cst}y|j|tjdWn#tk
rOtjddSYnXy#|ji}tjd|Wn)tk
rtjddddSYnXy|j|tjdWn#tk
rtjd	dSYnXt}tjd
|zy&|j	|i}tjd|Wn)tk
rPtjddddSYnX|j
d
sttjd|dSt||}t|rtjd|ntjd|dSt
j|rtjdntjddSWdtj|XdSWdQRXdS)Nz#Installed static build dependenciesz+Failed to install static build dependenciesFzGot build requires: %sz'Failure in get_requires_for_build_sdistexc_infoTz$Installed dynamic build dependenciesz,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 extensionzOutput file %s existszOutput file %s does not existzOutput file is a tar filezOutput file is not a tar file)r
pip_installloginforerrorget_requires_for_build_sdist	Exceptionrbuild_sdistendswithpjoinrtarfile
is_tarfileshutilrmtree)hooksbuild_sys_requiresenvreqstdfilenamepathr!/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/check.pycheck_build_sdistsV


	
	


		
	

r#c0Cst}y|j|tjdWn#tk
rOtjddSYnXy#|ji}tjd|Wn)tk
rtjddddSYnXy|j|tjdWn#tk
rtjd	dSYnXt}tjd
|zy&|j	|i}tjd|Wn)tk
rPtjddddSYnX|j
d
sttjd|dSt||}t|rtjd|ntjd|dSt
j|rtjdntjddSWdtj|XdSWdQRXdS)Nz#Installed static build dependenciesz+Failed to install static build dependenciesFzGot build requires: %sz'Failure in get_requires_for_build_sdistrTz$Installed dynamic build dependenciesz,Failed to install dynamic build dependencieszTrying to build wheel in %szbuild_wheel returned %rzFailure in build_wheelz.whlz'Filename %s doesn't have .whl extensionzOutput file %s existszOutput file %s does not existzOutput file is a zip filezOutput file is not a zip file)r
r
rrrrget_requires_for_build_wheelrrbuild_wheelrrrzipfile
is_zipfilerr)rrrrrrr r!r!r"check_build_wheelOsT


	
	


		
	
r(cCs(t|d}t|r+tjdntjddSy`t|}t|}WdQRX|d}|d}|d}|jd}tjd	Wn/tt	fk
rtjd
dddSYnXt
|||}t||}	t||}
|	stj
d
|
s$tj
d|	S)Nzpyproject.tomlzFound pyproject.tomlzMissing pyproject.tomlFzbuild-systemrequiresz
build-backendzbackend-pathzLoaded pyproject.tomlzInvalid pyproject.tomlrTz%Sdist checks failed; scroll up to seezWheel checks failed)rrrrropen	toml_loadgetrKeyErrorrr#r(warning)
source_dir	pyprojectfZpyproject_dataZbuildsysr)backendbackend_pathrZsdist_okZwheel_okr!r!r"checks0



	

r4cCstj}|jddd|j|}tt|j}|r`ttddn ttddt	j
ddS)	Nr/helpz%A directory containing pyproject.tomlz
Checks passedgreenz
Checks failedredr)argparseArgumentParseradd_argument
parse_argsr	r4r/printansisysexit)argvZapargsokr!r!r"mainsrCresetzZboldzr7zr6zcCsFtjdkr8tjjr8t|t|tdSt|SdS)NntrD)osnamer>stdoutisatty
ansi_codesstr)sattrr!r!r"r=sr=__main__)#__doc__r8loggingrFos.pathrrrZpip._vendor.tomlrrr+r
subprocessrr>rtempfilerr&Zcolorlogr	Zenvbuildr
wrappersr	getLogger__name__rr#r(r4rCrJr=r!r!r!r"<module>s498"
Back to Directory File Manager