ok

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/direct_url_helpers.pyc

�
x�_c@s�ddlZddlmZmZmZmZmZmZddlm	Z	ddl
mZyddlm
Z
Wnek
r�eZ
nXe	r�ddlmZddlmZddlmZneje�Zd	�Zded
�Zd�ZdS(i����N(tDIRECT_URL_METADATA_NAMEtArchiveInfot	DirectUrltDirectUrlValidationErrortDirInfotVcsInfo(tMYPY_CHECK_RUNNING(tvcs(tJSONDecodeError(tOptional(tLink(tDistributioncCs|j�|d}g}t|jt�rW|dj|jj|j|jj�7}n|t|jt�r�||j7}|jj	r�|j
|jj	�q�n8t|jt�s�t�|jj
s�t�||j7}|jr�|j
d|j�n|r|ddj|�7}n|S(s0Convert a DirectUrl to a pip requirement string.s @ s{}+{}@{}s
subdirectory=t#t&(tvalidatet
isinstancetinfoRtformatRturlt	commit_idRthashtappendRtAssertionErrorteditabletsubdirectorytjoin(t
direct_urltnametrequirementt	fragments((sW/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/direct_url_helpers.pyt%direct_url_as_pep440_direct_references$

	"

	c
Cs3|jr�tj|j�}|s't�|j|j�\}}}|r]|sTt�|}n|sit�|j|�}td|dt	d|j
d|d|�d|j�S|j�r�td|jdt
�d|j�Sd}|j}	|	rdj|	|j�}ntd|jdtd|�d|j�SdS(	NRRRRtrequested_revisionRs{}={}R(tis_vcsRtget_backend_for_schemetschemeRtget_url_rev_and_authturl_without_fragmenttget_revisionRRRtsubdirectory_fragmenttis_existing_dirRtNonet	hash_nameRRR(
tlinkt
source_dirtlink_is_in_wheel_cachetvcs_backendRRt_RRR)((sW/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/direct_url_helpers.pytdirect_url_from_link:s:				
		
		cCsj|jt�sdSytj|jt��SWn6tttfk
re}t	j
dt|j|�dSXdS(s�Obtain a DirectUrl from a pkg_resource.Distribution.

    Returns None if the distribution has no `direct_url.json` metadata,
    or if `direct_url.json` is invalid.
    sError parsing %s for %s: %sN(thas_metadataRR(Rt	from_jsontget_metadataRRtUnicodeDecodeErrortloggertwarningtproject_name(tdistte((sW/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/direct_url_helpers.pytdist_get_direct_urlls
(tloggingtpip._internal.models.direct_urlRRRRRRtpip._internal.utils.typingRtpip._internal.vcsRtjsonRtImportErrort
ValueErrorttypingR	tpip._internal.models.linkR
tpip._vendor.pkg_resourcesRt	getLoggert__name__R4RR(tFalseR/R9(((sW/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/direct_url_helpers.pyt<module>s.

	2

Zerion Mini Shell 1.0