관리-도구
편집 파일: build.cpython-39.pyc
a ��Re� � @ 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 ��/builddir/build/BUILDROOT/alt-python39-pip-21.3.1-2.el8.x86_64/opt/alt/python39/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_dir� 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 � setuptools�wheel)r r �KeyError� setdefault)r r r r r � compat_system'