ok

Mini Shell

Direktori : /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/
Upload File :
Current File : //opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyo

�
Bu�_c@s�dZddlmZddlmZddlZddlZddlZddlmZddl	Z	ddl
Z
ddlZddlZej
ddkr�d�Zd	�Znd
�Zd�Zdefd
��YZdefd��YZdefd��YZd�Zd�Zd�Zd�ZdZd�Zd�Zd�Zdd�Zd�Zdefd��YZdefd��YZ d �Z!d!d"d#d$d%hZ"d&�Z#e$d'kr�e#�ndS((sgThis is invoked in a subprocess to call the build backend hooks.

It expects:
- Command line args: hook_name, control_dir
- Environment variables:
      PEP517_BUILD_BACKEND=entry.point:spec
      PEP517_BACKEND_PATH=paths (separated with os.pathsep)
- control_dir/input.json:
  - {"kwargs": {...}}

Results:
- control_dir/output.json
  - {"return_val": ...}
i����(tglob(t
import_moduleN(tjoiniicKs5t|ddd��}tj|||�WdQXdS(Ntwtencodingsutf-8(topentjsontdump(tobjtpathtkwargstf((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyt
write_json!scCs/t|ddd��}tj|�SWdQXdS(NtrRsutf-8(RRtload(R	R((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyt	read_json%sc
Ks5t|d�� }tj||dd|�WdQXdS(NtwbRsutf-8(RRR(RR	R
R((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR+scCs)t|d��}tj|�SWdQXdS(Ntrb(RRR(R	R((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR/stBackendUnavailablecBseZdZd�ZRS(s&Raised if we cannot import the backendcCs
||_dS(N(t	traceback(tselfR((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyt__init__6s(t__name__t
__module__t__doc__R(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR4stBackendInvalidcBseZdZd�ZRS(s Raised if the backend is invalidcCs
||_dS(N(tmessage(RR((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR<s(RRRR(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR:stHookMissingcBseZdZRS(sARaised if a hook is missing and we are not executing the fallback(RRR(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR@scCsXtjjtjj|��}tjjtjj|��}tjj||g�|kS(s5Test if a file is located within the given directory.(tosR	tnormcasetabspathtcommonprefix(tfilenamet	directory((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pytcontained_inDscs�tjjd�}|r:|jtj�}|tjd*ntjd}|jd�\}}}yt|��Wn#t	k
r�t
tj���nX|r�t
�fd�|D��s�td��q�n|r�x)|jd�D]}t�|��q�Wn�S(sFind and load the build backendtPEP517_BACKEND_PATHitPEP517_BUILD_BACKENDt:c3s!|]}t�j|�VqdS(N(R"t__file__(t.0R	(R(sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pys	<genexpr>\ss(Backend was not loaded from backend-patht.(RtenvirontgettsplittpathseptsysR	t	partitionRtImportErrorRRt
format_exctanyRtgetattr(tbackend_pathtextra_pathitemsteptmod_patht_tobj_patht	path_part((RsO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyt_build_backendKs&


cCs9t�}y
|j}Wntk
r*gSX||�SdS(sfInvoke the optional get_requires_for_build_wheel hook

    Returns [] if the hook is not defined.
    N(R:tget_requires_for_build_wheeltAttributeError(tconfig_settingstbackendthook((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR;gs	

cCsZt�}y
|j}Wn0tk
rH|s8t��nt|||�SX|||�SdS(s�Invoke optional prepare_metadata_for_build_wheel

    Implements a fallback by building a wheel if the hook isn't defined,
    unless _allow_fallback is False in which case HookMissing is raised.
    N(R:t prepare_metadata_for_build_wheelR<Rt_get_wheel_metadata_from_wheel(tmetadata_directoryR=t_allow_fallbackR>R?((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR@us	

	tPEP517_ALREADY_BUILT_WHEELcCs_g}x<|j�D].}tjd|�}|r|j|�qqW|rO|Std��dS(s6Identify the .dist-info folder inside a wheel ZipFile.s[^/\\]+-[^/\\]+\.dist-info/s#No .dist-info folder found in wheelN(tnamelisttretmatchtappendt	Exception(twhl_ziptresR	tm((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyt_dist_info_files�sc
Cs�ddlm}|j||�}ttjj|t�d��WdQXtjj||�}||��)}t|�}|j	d|d|�WdQX|dj
d�dS(	s�Build a wheel and extract the metadata from it.

    Fallback for when the build backend does not
    define the 'get_wheel_metadata' hook.
    i����(tZipFileRNR	tmembersit/(tzipfileRNtbuild_wheelRRR	RtWHEEL_BUILT_MARKERRMt
extractallR+(R>RBR=RNtwhl_basenametwhl_filetzipft	dist_info((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyRA�scCs�|s
dStjj|�}tjjt|t��s;dSttjj|d��}|sedGHdSt	|�dkr�dGHdS|dS(sHCheck for a wheel already built during the get_wheel_metadata hook.
    s*.whls+Found wheel built marker, but no .whl filesisHFound multiple .whl files; unspecified behaviour. Will call build_wheel.iN(
tNoneRR	tdirnametisfiletpjoinRSRRtlen(RBtmetadata_parentt	whl_files((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyt_find_already_built_wheel�scCsHt|�}|r2tj||�tjj|�St�j|||�S(s�Invoke the mandatory build_wheel hook.

    If a wheel was already built in the
    prepare_metadata_for_build_wheel fallback, this
    will copy it rather than rebuilding the wheel.
    (R`tshutiltcopy2RR	tbasenameR:RR(twheel_directoryR=RBtprebuilt_whl((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyRR�scCs9t�}y
|j}Wntk
r*gSX||�SdS(sfInvoke the optional get_requires_for_build_wheel hook

    Returns [] if the hook is not defined.
    N(R:tget_requires_for_build_sdistR<(R=R>R?((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyRf�s	

t_DummyExceptioncBseZdZRS(s(Nothing should ever raise this exception(RRR(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyRg�stGotUnsupportedOperationcBseZdZd�ZRS(s9For internal use when backend raises UnsupportedOperationcCs
||_dS(N(R(RR((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyR�s(RRRR(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyRh�scCsSt�}y|j||�SWn/t|dt�k
rNttj���nXdS(s&Invoke the mandatory build_sdist hook.tUnsupportedOperationN(R:tbuild_sdistR2RgRhRR0(tsdist_directoryR=R>((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyRj�s
	R;R@RRRfRjcCsfttj�dkr%tjd�ntjd}tjd}|tkr_tjd|�nt�|}tt|d��}itd6dd6}y||d	�|d<Wn�t
k
r�}t|d
<|j|d<nmt
k
r}t|d<|j|d
<nDtk
r+}t|d<|j|d<ntk
rEt|d<nXt|t|d�dd�dS(Nis"Needs args: hook_name, control_diriisUnknown hook: %ss
input.jsontunsupportedt
return_valR
t
no_backendRtbackend_invalidt
backend_errorthook_missingsoutput.jsontindent(R]R-targvtexitt
HOOK_NAMEStglobalsRR\tFalseRYRtTrueRRRRhRR(t	hook_nametcontrol_dirR?t
hook_inputtjson_outte((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pytmain�s.






t__main__(%RRt	importlibRRRtos.pathRR\RFRaR-Rtversion_infoRRRIRRRR"R:R;R@RSRMRAR`RYRRRfRgRhRjRuR~R(((sO/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.pyt<module>sN												
		

Zerion Mini Shell 1.0