RedZddlZddlZddlZddlZddlmZmZddl Z ddl m Z ddl Z ddl Z ddlmZddlZddlmZddlmZmZdd lmZdd lmZejeZd Zd Zd ZddZ dddddZ!dZ"edkr e dSdS)zHCheck a project and backend by attempting to build using PEP 517 hooks. N)isfilejoin)CalledProcessError)mkdtemp)enable_colourful_output)TOMLDecodeError toml_load)BuildEnvironment)Pep517HookCallerct5} ||tdn6#t$r)tdYddddSwxYw |i}td|n8#t$r+tddYddddSwxYw ||tdn6#t$r)td YddddSwxYwt}td | | |i}td |nL#t$r?td dYtj |ddddSwxYw| d s=td| tj |ddddSt||}t|rtd|n=td| tj |ddddStj|rtdnz%A directory containing pyproject.toml)helpz Checks passedgreenz Checks failedredr) rr=argparseArgumentParser add_argument parse_argsrrGr>printansisysexit)argvapargsoks r-mainrXsKKHIII  " "BOO 4666 ==  D t  B  d?G,,----- d?E**+++  zzzz)resetboldrKrJctjdkrItjr+t |t |zt dzSt |S)NntrZ)osnamerRstdoutisatty ansi_codesstr)sattrs r-rQrQsJ w$3:,,..$#a&&(:g+>>>1vv rY__main__)N)#__doc__rLr9loggingr^os.pathrrr"r subprocessrrRr#tempfilerr3colorlogrcompatr r envbuildr wrappersr getLogger__name__rr.r5rGrXrbrQrYr-rss  )))))))) )))))) ------........&&&&&&&&&&&&g!!666r555pD,      zDFFFFFrY