관리-도구
편집 파일: build.cpython-37.pyc
B ��Re � @ s d Z ddlZddlZddlZddlmZ ddlZddlmZ ddl m Z ddlmZm Z ddlmZ e�e�Zd d � Zdd� Zd d� Zdd� Zd#dd�Ze�� Zejddd� ejddddd� ejddddd� ejdddd� d d!� Zed"k�r ee�� � dS )$z%Build a project using PEP 517 hooks. � N)�toml� )�BuildEnvironment)�Pep517HookCaller)�tempdir�mkdir_p)�FileNotFoundErrorc C s4 ddh}|t | �ks0dj|t | � d�}t|��dS )z7 Ensure build system has the requisite fields. �requiresz build-backendz"Missing required fields: {missing})�missingN)�set�format� ValueError)�system�required�message� r ��/builddir/build/BUILDROOT/alt-python37-pip-20.2.4-6.el8.x86_64/opt/alt/python37/lib/python3.7/site-packages/pip/_vendor/pep517/build.py�validate_system s r c C s4 t j�| d�}t|��}t�|�}W dQ R X |d S )zC Load the build system from a source dir (pyproject.toml). zpyproject.tomlNzbuild-system)�os�path�join�openr �load)� source_dir� pyproject�fZpyproject_datar r r �load_system s r c C sJ yt | �}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. z build-backendz setuptools.build_meta:__legacy__r � setuptools�wheel)r r �KeyError� setdefault)r r r r r � compat_system'