U ��.e� �@s�dZddlZddlZddlZddlZddlZddlmZddlm Z ddl m Z m Z ddl mZe�e�Zdd �Zd d �Zd d �Zdd�Zd"dd�Ze��Zejddd�ejddddd�ejddddd�ejdddd�dd �Zed!kr�ee���dS)#z%Build a project using PEP 517 hooks. �N�)�BuildEnvironment)�Pep517HookCaller)�tempdir�mkdir_p)�FileNotFoundErrorcCs4ddh}|t|�ks0dj|t|�d�}t|��dS)z7 Ensure build system has the requisite fields. �requires� build-backendz"Missing required fields: {missing})ZmissingN)�set�format� ValueError)�systemZrequired�message�r�Destination in which to save the builds relative to source dircCsPttd|js|jsdnd|js$|js(dndf��}|D]}t|j||j�q6dS)NZsdistr)�list�filterr,Zbinaryr*rZout_dir)�argsZdistsr(rrr�mainps �r6�__main__)NN)�__doc__�argparseZloggingrrr$ZenvbuildrZwrappersrZdirtoolsrr�compatrZ getLogger�__name__r!rrrr-r*�ArgumentParser�parser� add_argumentr6� parse_argsrrrr�sP       ����