관리-도구
편집 파일: build.cpython-38.pyc
U ʗ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-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/pep517/build.py�validate_system s �r c C s6 t j�| d�}t�|d��}t|�}W 5 Q R X |d S )zC Load the build system from a source dir (pyproject.toml). zpyproject.toml�rbzbuild-system)�os�path�join�io�openr )� source_dir� 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 � setuptools�wheel)r r �KeyError� setdefault)r r r r r � compat_system'