관리-도구
편집 파일: build.cpython-310.pyc
o ƚ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!kr�ee�� � dS dS )#z%Build a project using PEP 517 hooks. � N� )�BuildEnvironment)�Pep517HookCaller)�tempdir�mkdir_p)�FileNotFoundError� toml_loadc C s4 ddh}|t | �ksdj|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-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/pep517/build.py�validate_system s ��r c C sP t j�| d�}t�|d��}t|�}W d � |d S 1 sw 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 nw |�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'