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/wrappers.pyc

�
Bu�_c@s�ddlZddlmZddlZddlmZmZmZddl	Z	ddl
mZmZm
Z
ddlZddlmZddlmZyddljZd�ZWn ek
r�ed	��ZnXed
��Zdefd��YZd
efd��YZdefd��YZdefd��YZddd�Zddd�Zd�Z de!fd��YZ"dej#fd��YZ$dS(i����N(tcontextmanager(tdirnametabspathtjoin(t
check_calltcheck_outputtSTDOUT(tmkdtempi(tcompatcCstjtd�S(Ns_in_process.py(t	resourcestpatht__package__(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyt_in_proc_script_pathsccstttt��d�VdS(Ns_in_process.py(tpjoinRRt__file__(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRsccs't�}z	|VWdtj|�XdS(N(Rtshutiltrmtree(ttd((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyttempdirs		tBackendUnavailablecBseZdZd�ZRS(sEWill be raised if the backend cannot be imported in the hook process.cCs
||_dS(N(t	traceback(tselfR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyt__init__#s(t__name__t
__module__t__doc__R(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyR!stBackendInvalidcBseZdZd�ZRS(s)Will be raised if the backend is invalid.cCs||_||_||_dS(N(tbackend_nametbackend_pathtmessage(RRRR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyR)s		(RRRR(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyR'stHookMissingcBseZdZd�ZRS(s Will be raised on missing hooks.cCs#tt|�j|�||_dS(N(tsuperRRt	hook_name(RR ((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyR1s(RRRR(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyR/stUnsupportedOperationcBseZdZd�ZRS(sDMay be raised by build_sdist if the backend indicates that it can't.cCs
||_dS(N(R(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyR8s(RRRR(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyR!6scCs?tjj�}|r%|j|�nt|d|d|�dS(s5The default method of calling the wrapper subprocess.tcwdtenvN(tostenvirontcopytupdateR(tcmdR"t
extra_environR#((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pytdefault_subprocess_runner<scCsEtjj�}|r%|j|�nt|d|d|dt�dS(sDA method of calling the wrapper subprocess while suppressing output.R"R#tstderrN(R$R%R&R'RR(R(R"R)R#((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pytquiet_subprocess_runnerEscCs�tjj|�r!td��ntjj|�}tjjtjj||��}tjj|�}tjj|�}tjj||g�|kr�td��n|S(s�Normalise and check a backend path.

    Ensure that the requested backend path is specified as a relative path,
    and resolves to a location under the given source tree.

    Return an absolute version of the requested path.
    spaths must be relatives paths must be inside source tree(	R$R
tisabst
ValueErrorRtnormpathRtnormcasetcommonprefix(tsource_treet	requestedt
abs_sourcet
abs_requestedtnorm_sourcetnorm_requested((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pytnorm_and_checkNs!tPep517HookCallercBsweZdZd	d	d�Zed��Zd	d�Zd	ed�Z	d	d	d�Z
d	d�Zd	d�Zd�Z
RS(
seA wrapper around a source directory to be built with a PEP 517 backend.

    source_dir : The path to the source directory, containing pyproject.toml.
    build_backend : The build backend spec, as per PEP 517, from
        pyproject.toml.
    backend_path : The backend path, as per PEP 517, from pyproject.toml.
    runner : A callable that invokes the wrapper subprocess.

    The 'runner', if provided, must expect the following:
        cmd : a list of strings representing the command and arguments to
            execute, as would be passed to e.g. 'subprocess.check_call'.
        cwd : a string representing the working directory that must be
            used for the subprocess. Corresponds to the provided source_dir.
        extra_environ : a dict mapping environment variable names to values
            which must be set for the subprocess execution.
    cCsq|dkrt}nt|�|_||_|r[g|D]}t|j|�^q:}n||_||_dS(N(tNoneR*Rt
source_dirt
build_backendR8Rt_subprocess_runner(RR;R<Rtrunnertp((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRws		(	ccs,|j}||_z	dVWd||_XdS(s\A context manager for temporarily overriding the default subprocess
        runner.
        N(R=(RR>tprev((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pytsubprocess_runner�s
			cCs|jdi|d6�S(sGIdentify packages required for building a wheel

        Returns a list of dependency specifications, e.g.:
            ["wheel >= 0.25", "setuptools"]

        This does not include requirements specified in pyproject.toml.
        It returns the result of calling the equivalently named hook in a
        subprocess.
        tget_requires_for_build_wheeltconfig_settings(t
_call_hook(RRC((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRB�s
cCs+|jdit|�d6|d6|d6�S(sqPrepare a *.dist-info folder with metadata for this project.

        Returns the name of the newly created folder.

        If the build backend defines a hook with this name, it will be called
        in a subprocess. If not, the backend will be asked to build a wheel,
        and the dist-info extracted from that (unless _allow_fallback is
        False).
        t prepare_metadata_for_build_wheeltmetadata_directoryRCt_allow_fallback(RDR(RRFRCRG((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRE�s
cCsF|dk	rt|�}n|jdit|�d6|d6|d6�S(svBuild a wheel from this project.

        Returns the name of the newly created file.

        In general, this will call the 'build_wheel' hook in the backend.
        However, if that was previously called by
        'prepare_metadata_for_build_wheel', and the same metadata_directory is
        used, the previously built wheel will be copied to wheel_directory.
        tbuild_wheeltwheel_directoryRCRFN(R:RRD(RRIRCRF((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRH�s
cCs|jdi|d6�S(s<Identify packages required for building a wheel

        Returns a list of dependency specifications, e.g.:
            ["setuptools >= 26"]

        This does not include requirements specified in pyproject.toml.
        It returns the result of calling the equivalently named hook in a
        subprocess.
        tget_requires_for_build_sdistRC(RD(RRC((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRJ�s
cCs$|jdit|�d6|d6�S(s�Build an sdist from this project.

        Returns the name of the newly created file.

        This calls the 'build_sdist' backend hook in a subprocess.
        tbuild_sdisttsdist_directoryRC(RDR(RRLRC((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRK�s
c
Cs�tjddkr(|jjd�}n	|j}i|d6}|jr�tjj|j�}tjddkr�|jtj��}n||d<nt	��G}i|d6}t
j|t|d�dd�t
��8}|jtjt|�||gd	|jd
|�WdQXt
jt|d��}	|	jd�rQt|	jd
d���n|	jd�r{t|	jd
d���n|	jd�r�td|jd|jd|	jdd���n|	jd�r�t|��n|	dSWdQXdS(NiitASCIItPEP517_BUILD_BACKENDtPEP517_BACKEND_PATHtkwargss
input.jsontindentR"R)soutput.jsontunsupportedRtt
no_backendtbackend_invalidRRRt
backend_errorthook_missingt
return_val(tsystversion_infoR<tencodeRR$tpathsepRtgetfilesystemencodingRRt
write_jsonR
RR=t
executabletstrR;t	read_jsontgetR!RRR(
RR RPR<R)RRt
hook_inputtscripttdata((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRD�s>	
	

	
		N(RRRR:RRRARBtTrueRERHRJRKRD(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyR9fst
LoggerWrappercBsAeZdZd�Zd�Zed��Zd�Zd�ZRS(sd
    Read messages from a pipe and redirect them
    to a logger (see python's logging module).
    cCsftjj|�t|_||_||_tj�\|_	|_
tj|j	�|_|j
�dS(N(t	threadingtThreadRRftdaemontloggertlevelR$tpipetfd_readtfd_writetfdopentreadertstart(RRkRl((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRs			cCs|jS(N(Ro(R((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pytfileno(scCs|jtj�r|d S|S(Ni����(tendswithR$tlinesep(tmsg((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pytremove_newline+scCs.x'|jD]}|j|j|��q
WdS(N(Rqt_writeRw(Rtline((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pytrun/scCs|jj|j|�dS(N(RktlogRl(RR((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRx3s(	RRRRRststaticmethodRwRzRx(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyRgs	
		(%Rht
contextlibRR$tos.pathRRRR
Rt
subprocessRRRRYttempfileRRSRtimportlib.resourcesR	RtImportErrorRt	ExceptionRRRR!R:R*R,R8tobjectR9RiRg(((sL/opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/pep517/wrappers.pyt<module>s.

				�

Zerion Mini Shell 1.0