U .e @sdZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z ddl mZeeZdd Zd d Zd d ZddZd"ddZeZejdddejdddddejdddddejdddddd Zed!kreedS)#z%Build a project using PEP 517 hooks. N)BuildEnvironment)Pep517HookCaller)tempdirmkdir_p)FileNotFoundErrorcCs4ddh}|t|ks0dj|t|d}t|dS)z7 Ensure build system has the requisite fields. requires build-backendz"Missing required fields: {missing})ZmissingN)setformat ValueError)systemZrequiredmessagerDestination in which to save the builds relative to source dircCsPttd|js|jsdnd|js$|js(dndf}|D]}t|j||jq6dS)NZsdistr)listfilterr,Zbinaryr*rZout_dir)argsZdistsr(rrrmainps r6__main__)NN)__doc__argparseZloggingrrr$ZenvbuildrZwrappersrZdirtoolsrrcompatrZ getLogger__name__r!rrrr-r*ArgumentParserparser add_argumentr6 parse_argsrrrrsP