ok
Direktori : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/ |
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/direct_url_helpers.pyo |
� x�_c @ s� d d l Z d d l m Z m Z m Z m Z m Z m Z d d l m Z d d l m Z y d d l m Z Wn e k r� e Z n Xe r� d d l m Z d d l m Z d d l m Z n e j e � Z d � Z d e d � Z d � Z d S( i����N( t DIRECT_URL_METADATA_NAMEt ArchiveInfot DirectUrlt DirectUrlValidationErrort DirInfot VcsInfo( t MYPY_CHECK_RUNNING( t vcs( t JSONDecodeError( t Optional( t Link( t Distributionc C s� | j � | d } g } t | j t � rW | d j | j j | j | j j � 7} nQ t | j t � r� | | j 7} | j j r� | j | j j � q� n | | j 7} | j r� | j d | j � n | r� | d d j | � 7} n | S( s0 Convert a DirectUrl to a pip requirement string.s @ s {}+{}@{}s subdirectory=t #t &( t validatet isinstancet infoR t formatR t urlt commit_idR t hasht appendt subdirectoryt join( t direct_urlt namet requirementt fragments( ( sW /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/direct_url_helpers.pyt% direct_url_as_pep440_direct_reference s " c C s | j r� t j | j � } | j | j � \ } } } | rE | } n | j | � } t d | d t d | j d | d | � d | j � S| j � r� t d | j d t � d | j � Sd } | j } | r� d j | | j � } n t d | j d t d | � d | j � Sd S( NR R R R t requested_revisionR s {}={}R ( t is_vcsR t get_backend_for_schemet schemet get_url_rev_and_autht url_without_fragmentt get_revisionR R R t subdirectory_fragmentt is_existing_dirR t Nonet hash_nameR R R ( t linkt source_dirt link_is_in_wheel_cachet vcs_backendR R t _R R R'