<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
Re                 @   s  d Z ddlZddlZddlZddlmZ ddlZddlmZ ddl	m
Z
 ddlmZmZ ddlmZ ejeZd	d
 Zdd Zdd Zdd Zd#ddZej Zejddd ejddddd ejddddd ejdddd d d! Zed"kr eej  dS )$z%Build a project using PEP 517 hooks.
    N)toml   )BuildEnvironment)Pep517HookCaller)tempdirmkdir_p)FileNotFoundErrorc             C   s4   ddh}|t | ks0dj|t |  d}t|dS )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 jj| d}t|}tj|}W dQ R X |d S )zC
    Load the build system from a source dir (pyproject.toml).
    zpyproject.tomlNzbuild-system)ospathjoinopenr   load)
source_dir	pyprojectfZpyproject_datar   r   r   load_system   s    
r   c             C   sJ   yt | }W n ttfk
r(   i }Y nX |jdd |jdddg |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'   s    
r!   c             C   s   dj f t }t| |}|i }tjd| |j| tjd t b}tjd|| dj f t }t| |}	|	|i }
tjj	||
}t
j|tjj	|tjj|
 W d Q R X d S )Nzget_requires_for_build_{dist}zGot build requires: %sz$Installed dynamic build dependencieszTrying to build %s in %szbuild_{dist})r   localsgetattrloginfopip_installr   r   r   r   shutilmovebasename)hooksenvdistdestZget_requires_nameget_requiresreqstdZ
build_namebuildfilenamesourcer   r   r   	_do_build:   s    




r4   c             C   sv   |p
t | }tjj| |pd}t| t| t| |d |jd}t "}|j	|d  t
|||| W d Q R X d S )Nr,   zbuild-backendzbackend-pathr	   )r   r   r   r   r   r   r   getr   r&   r4   )r   r,   r-   r   r*   r+   r   r   r   r1   L   s    r1   r   z%A directory containing pyproject.toml)helpz--binaryz-b
store_trueF)actiondefaultz--sourcez-sz	--out-dirz-oz>Destination in which to save the builds relative to source dirc             C   sX   t td | js| j rdnd | js(| j r,dnd f}x|D ]}t| j|| j q<W d S )Nsdistr   )listfilterr3   binaryr1   r   Zout_dir)argsdistsr,   r   r   r   mainp   s
    
r@   __main__)NN)__doc__argparseloggingr   pip._vendorr   r'   Zenvbuildr   wrappersr   Zdirtoolsr   r   compatr   	getLogger__name__r$   r   r   r!   r4   r1   ArgumentParserparseradd_argumentr@   
parse_argsr   r   r   r   <module>   sB   



