관리-도구
편집 파일: build.cpython-39.opt-1.pyc
a ����[��f� ����������������������@���s��d�Z�ddlZddlZddlZddlZddlZddlmZ�ddlm Z �ddl mZmZ�ddl mZmZ�e�e�Zdd ��Zd d��Zdd ��Zdd��Zd"dd�Ze���Zejddd��ejddddd��ejddddd��ejdddd��dd ��Zed!k�r�ee�����dS�)#z%Build a project using PEP 517 hooks. �����N����)�BuildEnvironment)�Pep517HookCaller)�tempdir�mkdir_p)�FileNotFoundError� toml_loadc�����������������C���s4���ddh}|t�|��ks0dj|t�|���d�}t|��dS�)z7 Ensure build system has the requisite fields. �requires� build-backendz"Missing required fields: {missing})�missingN)�set�format� ValueError)�system�required�message��r����</usr/lib/python3.9/site-packages/pip/_vendor/pep517/build.py�validate_system���s���� �r���c�����������������C���sJ���t�j�|�d�}t�|d��}t|�}W�d����n1�s80����Y��|d�S�)zC Load the build system from a source dir (pyproject.toml). zpyproject.toml�rbNzbuild-system)�os�path�join�io�openr���)� source_dirZ pyproject�fZpyproject_datar���r���r����load_system���s����&r���c�������������� ���C���sH���zt�|��}W�n�ttfy&���i�}Y�n0�|�dd��|�dddg��|S�)z� Given a source dir, attempt to get a build system backend and requirements from pyproject.toml. Fallback to setuptools but only if the file was not found or a build system was not indicated. r ���z setuptools.build_meta:__legacy__r ���Z setuptools�wheel)r���r����KeyError� setdefault)r���r���r���r���r���� compat_system'���s���� �r!���c�������������� ���C���s����dj�f�i�t����}t|�|�}|i��}t�d|��|�|��t�d��t���p}t�d||��dj�f�i�t����}t|�|�} | |i��} tj� || �}t �|tj� |tj�| ����W�d�����n1�s�0����Y��d�S�)Nzget_requires_for_build_{dist}zGot build requires: %sz$Installed dynamic build dependencieszTrying to build %s in %szbuild_{dist}) r ����locals�getattr�log�info�pip_installr���r���r���r����shutil�move�basename)�hooks�env�dist�destZget_requires_nameZget_requiresZreqsZtdZ build_name�build�filename�sourcer���r���r���� _do_build:���s���� r1���c�����������������C���s����|p t�|��}tj�|�|pd�}t|��t|��t|�|d�|�d��}t���,}|� |d���t ||||��W�d�����n1�s|0����Y��d�S�)Nr,���r ���zbackend-pathr ���)r���r���r���r���r���r���r����getr���r&���r1���)r���r,���r-���r���r*���r+���r���r���r���r.���L���s�����r.���r���z%A directory containing pyproject.toml)�helpz--binaryz-b� store_trueF)�action�defaultz--sourcez-sz --out-dirz-oz>Destination in which to save the builds relative to source dirc�����������������C���sZ���t��d��ttd�|�js|�js dnd�|�js.|�js2dnd�f��}|D�]}t|�j||�j��q@d�S�)NzQpep517.build is deprecated. Consider switching to https://pypi.org/project/build/Zsdistr���) r$���Zwarning�list�filterr0���Zbinaryr.���r���Zout_dir)�argsZdistsr,���r���r���r����mainp���s���� �r:����__main__)NN)�__doc__�argparser���Zloggingr���r'���Zenvbuildr���Zwrappersr���Zdirtoolsr���r����compatr���r���Z getLogger�__name__r$���r���r���r!���r1���r.����ArgumentParser�parser�add_argumentr:���� parse_argsr���r���r���r����<module>���sJ��� ����