HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/pip/_vendor/pep517/__pycache__/build.cpython-310.pyc
o

@%Ne�
�@sdZddlZddlZddlZddlZddlZddlmZddlm	Z	ddl
mZmZddl
mZmZe�e�Zdd	�Zd
d�Zdd
�Zdd�Zd"dd�Ze��Zejddd�ejddddd�ejddddd�ejdddd�dd �Zed!kr�ee���dSdS)#z%Build a project using PEP 517 hooks.
�N�)�BuildEnvironment)�Pep517HookCaller)�tempdir�mkdir_p)�FileNotFoundError�	toml_loadcCs4ddh}|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�:/usr/lib/python3/dist-packages/pip/_vendor/pep517/build.py�validate_systems
��rcCsPtj�|d�}t�|d��}t|�}Wd�|dS1swY|dS)zC
    Load the build system from a source dir (pyproject.toml).
    zpyproject.toml�rbNzbuild-system)�os�path�join�io�openr)�
source_dir�	pyproject�f�pyproject_datarrr�load_systems

��rc	CsHzt|�}Wn
ttfyi}Ynw|�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)rr�KeyError�
setdefault)rrrrr�
compat_system's��r$c
Cs�djdit���}t||�}|i�}t�d|�|�|�t�d�t��9}t�d||�djdit���}t||�}	|	|i�}
tj�	||
�}t
�|tj�	|tj�|
���Wd�dS1sawYdS)Nzget_requires_for_build_{dist}zGot build requires: %sz$Installed dynamic build dependencieszTrying to build %s in %szbuild_{dist}r)
r
�locals�getattr�log�info�pip_installrrrr�shutil�move�basename)�hooks�env�dist�dest�get_requires_name�get_requires�reqs�td�
build_name�build�filename�sourcerrr�	_do_build:s




 "�r9cCs�|pt|�}tj�||p
d�}t|�t|�t||d|�d��}t��}|�	|d�t
||||�Wd�dS1s?wYdS)Nr/r
zbackend-pathr	)rrrrrrr�getrr)r9)rr/r0rr-r.rrrr6Ls�"�r6rz%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 dircCsZt�d�ttd|js|jsdnd|js|jsdndf��}|D]
}t|j||j�q dS)NzQpep517.build is deprecated. Consider switching to https://pypi.org/project/build/�sdistr!)	r'�warning�list�filterr8�binaryr6r�out_dir)�args�distsr/rrr�mainps
��rG�__main__)NN)�__doc__�argparser�loggingrr*�envbuildr�wrappersr�dirtoolsrr�compatrr�	getLogger�__name__r'rrr$r9r6�ArgumentParser�parser�add_argumentrG�
parse_argsrrrr�<module>sN


�����