????

Your IP : 216.73.216.152


Current Path : /usr/lib/python2.7/site-packages/pip/_internal/models/
Upload File :
Current File : //usr/lib/python2.7/site-packages/pip/_internal/models/link.pyc

�
}�\]c@s�ddlZddlZddlmZddlmZmZmZm	Z	m
Z
ddlmZddl
mZer�ddlmZmZmZmZddlmZddlmZnd	efd
��YZdS(i����N(tparse(tWHEEL_EXTENSIONtpath_to_urltredact_password_from_urltsplit_auth_from_netloctsplitext(tKeyBasedCompareMixin(tMYPY_CHECK_RUNNING(tOptionaltTexttTupletUnion(tHTMLPage(tHashestLinkcBsaeZdZdddd�Zd�Zd�Zed��Zed��Z	ed��Z
ed��Zed��Zd	�Z
ed
��Zed��Zejd�Zed
��Zejd�Zed��Zejd�Zed��Zed��Zed��Zed��Zed��Zed��Zed��Zd�ZRS(s?Represents a parsed link from a Package Index's simple URL
    cCs�|jd�rt|�}ntj|�|_||_||_|rN|nd|_||_	t
t|�jd|dt�dS(s`
        :param url: url of the resource pointed to (href of the link)
        :param comes_from: instance of HTMLPage where the link was found,
            or string.
        :param requires_python: String containing the `Requires-Python`
            metadata field, specified in PEP 345. This may be specified by
            a data-requires-python attribute in the HTML link tag, as
            described in PEP 503.
        :param yanked_reason: the reason the file has been yanked, if the
            file has been yanked, or None if the file hasn't been yanked.
            This is the value of the "data-yanked" attribute, if present, in
            a simple repository HTML link. If the file has been yanked but
            no reason was provided, this should be the empty string. See
            PEP 592 for more information and the specification.
        s\\tkeytdefining_classN(
t
startswithRturllib_parseturlsplitt_parsed_urlt_urlt
comes_fromtNonetrequires_pythont
yanked_reasontsuperRt__init__(tselfturlRRR((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyRs			cCs\|jrd|j}nd}|jrEdt|j�|j|fStt|j��SdS(Ns (requires-python:%s)ts%s (from %s)%s(RRRRtstr(Rtrp((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyt__str__>s		cCsd|S(Ns	<Link %s>((R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyt__repr__IscCs|jS(N(R(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyRLscCsl|jjd�}tj|�}|s@t|j�\}}|Stj|�}|shtd|j	��|S(Nt/sURL %r produced no filename(
tpathtrstript	posixpathtbasenameRtnetlocRtunquotetAssertionErrorR(RR$tnameR(t	user_pass((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pytfilenameQscCs
|jjS(N(Rtscheme(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyR.`scCs
|jjS(s4
        This can contain auth information.
        (RR((R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyR(escCstj|jj�S(N(RR)RR$(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyR$mscCsttj|jjd���S(NR#(RR&R'R$R%(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyRrscCs|j�dS(Ni(R(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pytextvscCs4|j\}}}}}tj||||df�S(N(RRt
urlunsplitR(RR.R(R$tquerytfragment((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyturl_without_fragment{ss[#&]egg=([^&]*)cCs,|jj|j�}|sdS|jd�S(Ni(t_egg_fragment_retsearchRRtgroup(Rtmatch((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pytegg_fragment�ss[#&]subdirectory=([^&]*)cCs,|jj|j�}|sdS|jd�S(Ni(t_subdirectory_fragment_reR5RRR6(RR7((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pytsubdirectory_fragment�ss2(sha1|sha224|sha384|sha256|sha512|md5)=([a-f0-9]+)cCs,|jj|j�}|r(|jd�SdS(Ni(t_hash_reR5RR6R(RR7((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pythash�s
cCs,|jj|j�}|r(|jd�SdS(Ni(R;R5RR6R(RR7((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyt	hash_name�s
cCs0tj|jjdd�djdd�d�S(Nt#iit?(R&R'Rtsplit(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pytshow_url�scCs
|jtkS(N(R/R(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pytis_wheel�scCs*ddlm}|j|jkr&tStS(s�
        Determines if this points to an actual artifact (e.g. a tarball) or if
        it points to an "abstract" thing like a path or a VCS location.
        i����(tvcs(tpip._internal.vcsRCR.tall_schemestFalsetTrue(RRC((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pytis_artifact�scCs
|jdk	S(N(RR(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyt	is_yanked�scCs
|jdk	S(N(R=R(R((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pythas_hash�scCs]|dks|jrtS|jdk	s/t�|jdk	sDt�|j|jd|j�S(sG
        Return True if the link has a hash and it is allowed.
        t
hex_digestN(RRJRFR=R*R<tis_hash_allowed(Rthashes((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyRL�s
N(t__name__t
__module__t__doc__RRR!R"tpropertyRR-R.R(R$RR/R3tretcompileR4R8R9R:R;R<R=RARBRHRIRJRL(((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyRs8"				(R&RRtpip._vendor.six.moves.urllibRRtpip._internal.utils.miscRRRRRtpip._internal.utils.modelsRtpip._internal.utils.typingRttypingRR	R
Rtpip._internal.indexRtpip._internal.utils.hashesR
R(((s8/tmp/pip-install-ewDPok/pip/pip/_internal/models/link.pyt<module>s("