관리-도구
편집 파일: build.cpython-38.pyc
U ��.e� � @ s� d Z ddlZddlZddlZddlZddlZddlmZ ddlm Z ddl mZmZ ddl mZ e�e�Zdd � Zd d� Zdd � 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)�FileNotFoundErrorc C s4 ddh}|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 �</usr/lib/python3.8/site-packages/pip/_vendor/pep517/build.py�validate_system s �r c C s4 t j�| d�}t|��}t�|�}W 5 Q R X |d S )zC Load the build system from a source dir (pyproject.toml). zpyproject.tomlzbuild-system)�os�path�join�open�toml�load)� source_dirZ pyproject�fZpyproject_datar r r �load_system s r c C sJ zt | �}W n ttfk r( i }Y nX |�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'