Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/__pycache__/build.cpython-35.pyc



t_
@svdZddlZddlZddlZddlmZddlZddlmZddl	m
Z
ddlmZm
Z
ddlmZejeZd	d
ZddZd
dZddZddddZejZejdddejddddddejddddddejdddd d!d"Zed#krreejdS)$z%Build a project using PEP 517 hooks.
N)toml)BuildEnvironment)Pep517HookCaller)tempdirmkdir_p)FileNotFoundErrorcCsJddh}|t|ksFdjd|t|}t|dS)z7
    Ensure build system has the requisite fields.
    requiresz
build-backendz"Missing required fields: {missing}missingN)setformat
ValueError)systemrequiredmessager/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/pep517/build.pyvalidate_systems
	rc	CsBtjj|d}t|}tj|}WdQRX|dS)zC
    Load the build system from a source dir (pyproject.toml).
    zpyproject.tomlNzbuild-system)ospathjoinopenrload)
source_dir	pyprojectfZpyproject_datarrrload_systemsrcCs[yt|}Wnttfk
r0i}YnX|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	
setuptoolswheel)rrKeyError
setdefault)rrrrr
compat_system'sr!c
Csdjt}t||}|i}tjd||j|tjdt}tjd||djt}t||}	|	|i}
tjj	||
}t
j|tjj	|tjj|
WdQRXdS)Nzget_requires_for_build_{dist}zGot build requires: %sz$Installed dynamic build dependencieszTrying to build %s in %szbuild_{dist})
rlocalsgetattrloginfopip_installrrrrshutilmovebasename)hooksenvdistdestZget_requires_nameget_requiresreqstdZ
build_namebuildfilenamesourcerrr	_do_build:s

r4cCs|pt|}tjj||p'd}t|t|t||d|jd}t+}|j	|dt
||||WdQRXdS)Nr,z
build-backendzbackend-pathr	)rrrrrrrgetrr&r4)rr,r-rr*r+rrrr1Ls

r1rhelpz%A directory containing pyproject.tomlz--binaryz-baction
store_truedefaultFz--sourcez-sz	--out-dirz-oz>Destination in which to save the builds relative to source dircCsxttd|js|jr"dnd|js8|jr>dndf}x$|D]}t|j||jqTWdS)Nsdistr)listfilterr3binaryr1rZout_dir)argsdistsr,rrrmainps
	(
r@__main__)__doc__argparseloggingrpip._vendorrr'ZenvbuildrwrappersrZdirtoolsrrcompatr	getLogger__name__r$rrr!r4r1ArgumentParserparseradd_argumentr@
parse_argsrrrr<module>sB
			
Back to Directory File Manager