관리-도구
편집 파일: build.cpython-36.pyc
3 �Re � @ s d Z ddlZddlZddlZddlmZ ddlZddlmZ ddl m Z ddlmZm Z ddlmZ eje�Zd d � Zdd� Zd d� Zdd� Zd#dd�Zej� Zejddd� ejddddd� ejddddd� ejdddd� d d!� Zed"k�r eej� � 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-python36-pip-20.2.4-5.el8.x86_64/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/build.py�validate_system s r c C s4 t jj| d�}t|��}tj|�}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 |jdd� |jdddg� |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'