a lj @sdZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z ddl mZmZeeZdd Zd d Zd d ZddZd"ddZeZejdddejdddddejdddddejdddddd Zed!kreedS)#z%Build a project using PEP 517 hooks. N)BuildEnvironment)Pep517HookCaller)tempdirmkdir_p)FileNotFoundError toml_loadcCs4ddh}|t|ks0dj|t|d}t|dS)z7 Ensure build system has the requisite fields. requires build-backendz"Missing required fields: {missing})missingN)setformat ValueError)systemrequiredmessagerDestination in which to save the builds relative to source dircCsZtdttd|js|js dnd|js.|js2dndf}|D]}t|j||jq@dS)NzQpep517.build is deprecated. Consider switching to https://pypi.org/project/build/Zsdistr) r$Zwarninglistfilterr0Zbinaryr.rZout_dir)argsZdistsr,rrrmainps r:__main__)NN)__doc__argparserZloggingrr'ZenvbuildrZwrappersrZdirtoolsrrcompatrrZ getLogger__name__r$rrr!r1r.ArgumentParserparser add_argumentr: parse_argsrrrrsJ