ó
^†êWc           @` sO  d  d l  m Z m Z m Z d  d l Z d  d l Z d  d l Z d  d l Z d  d l m	 Z	 m
 Z
 m Z m Z d  d l m Z m Z m Z m Z d  d l m Z d d l m Z d d l m Z m Z d	 d
 d d d g Z d	 e f d „  ƒ  YZ d
 e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ  e d ƒ e d ƒ Be d ƒ Be d ƒ Be d ƒ Be d ƒ Be d ƒ Be d ƒ Be d ƒ Be d  ƒ Be d! ƒ Be d" ƒ Be d# ƒ Be d$ ƒ Be d% ƒ Be d& ƒ Be d' ƒ Be d( ƒ BZ! i d! d" 6d  d# 6d d$ 6d d% 6d d& 6d d' 6Z" e! j# d) „  ƒ e d* ƒ e d+ ƒ Be d, ƒ Be d- ƒ Be d. ƒ Be d/ ƒ Be d0 ƒ Be d1 ƒ BZ$ e$ e d2 ƒ Be d3 ƒ BZ% e d4 ƒ e d5 ƒ BZ& e& j# d6 „  ƒ e d7 ƒ e d8 ƒ BZ' e! e& BZ( e e( e% e( ƒ Z) e) j# d9 „  ƒ e d: ƒ j* ƒ  Z+ e d; ƒ j* ƒ  Z, e ƒ  Z- e) e e+ e- e, ƒ BZ. e- e. e e' e- ƒ >e e- e Z/ d< „  Z0 e1 d= „ Z2 i d> „  d3 6d? „  d2 6e j3 d1 6e j4 d- 6e j5 d+ 6e j6 d. 6e j7 d, 6e j8 d0 6Z9 d@ „  Z: e ƒ  Z; dA „  Z< dB „  Z= dC „  Z> dD „  Z? d e f dE „  ƒ  YZ@ d S(F   i    (   t   absolute_importt   divisiont   print_functionN(   t   ParseExceptiont   ParseResultst   stringStartt	   stringEnd(   t
   ZeroOrMoret   Groupt   Forwardt   QuotedString(   t   Literali   (   t   string_types(   t	   Specifiert   InvalidSpecifiert   InvalidMarkert   UndefinedComparisont   UndefinedEnvironmentNamet   Markert   default_environmentc           B` s   e  Z d  Z RS(   sE   
    An invalid marker was found, users should refer to PEP 508.
    (   t   __name__t
   __module__t   __doc__(    (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR      s   c           B` s   e  Z d  Z RS(   sP   
    An invalid operation was attempted on a value that doesn't support it.
    (   R   R   R   (    (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR   !   s   c           B` s   e  Z d  Z RS(   s\   
    A name was attempted to be used that does not exist inside of the
    environment.
    (   R   R   R   (    (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR   '   s   t   Nodec           B` s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C` s   | |  _  d  S(   N(   t   value(   t   selfR   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   __init__0   s    c         C` s   t  |  j ƒ S(   N(   t   strR   (   R   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   __str__3   s    c         C` s   d j  |  j j t |  ƒ ƒ S(   Ns   <{0}({1!r})>(   t   formatt	   __class__R   R   (   R   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   __repr__6   s    (   R   R   R   R   R   (    (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR   .   s   		t   Variablec           B` s   e  Z RS(    (   R   R   (    (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR    :   s   t   Valuec           B` s   e  Z RS(    (   R   R   (    (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR!   >   s   t   implementation_versiont   platform_python_implementationt   implementation_namet   python_full_versiont   platform_releaset   platform_versiont   platform_machinet   platform_systemt   python_versiont   sys_platformt   os_names   os.names   sys.platforms   platform.versions   platform.machines   platform.python_implementationt   python_implementationt   extrac         C` s   t  t j | d | d ƒ ƒ S(   Ni    (   R    t   ALIASESt   get(   t   st   lt   t(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   <lambda>^   s    s   ===s   ==s   >=s   <=s   !=s   ~=t   >t   <s   not int   int   't   "c         C` s   t  | d ƒ S(   Ni    (   R!   (   R1   R2   R3   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR4   n   s    t   andt   orc         C` s   t  | d ƒ S(   Ni    (   t   tuple(   R1   R2   R3   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR4   u   s    t   (t   )c         C` s4   t  |  t ƒ r, g  |  D] } t | ƒ ^ q S|  Sd  S(   N(   t
   isinstanceR   t   _coerce_parse_result(   t   resultst   i(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR@      s    c         C` sÔ   t  |  t t t f ƒ s t ‚ t  |  t ƒ rf t |  ƒ d k rf t  |  d t t f ƒ rf t |  d ƒ St  |  t ƒ r° d „  |  Dƒ } | r˜ d j | ƒ Sd d j | ƒ d Sn  t  |  t ƒ rÌ d j |  Œ  S|  Sd  S(   Ni   i    c         s` s!   |  ] } t  | d  t ƒVq d S(   t   firstN(   t   _format_markert   False(   t   .0t   m(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pys	   <genexpr>”   s    t    R=   R>   s   {0} {1} "{2}"(	   R?   t   listR<   R   t   AssertionErrort   lenRD   t   joinR   (   t   markerRC   t   inner(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyRD   ˆ   s    !c         C` s
   |  | k S(   N(    (   t   lhst   rhs(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR4       s    c         C` s
   |  | k S(   N(    (   RO   RP   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR4   ¡   s    c         C` s†   y t  d j | | g ƒ ƒ } Wn t k
 r2 n X| j |  ƒ St j | ƒ } | d  k ry t d j | |  | ƒ ƒ ‚ n  | |  | ƒ S(   Nt    s#   Undefined {0!r} on {1!r} and {2!r}.(	   R   RL   R   t   containst
   _operatorsR0   t   NoneR   R   (   RO   t   opRP   t   spect   oper(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   _eval_op«   s    c         C` s:   |  j  | t ƒ } | t k r6 t d j | ƒ ƒ ‚ n  | S(   Ns/   {0!r} does not exist in evaluation environment.(   R0   t
   _undefinedR   R   (   t   environmentt   nameR   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   _get_env¿   s
    c   	      C` s,  g  g } x|  D]} t  | t t t f ƒ s4 t ‚ t  | t ƒ r` | d j t | | ƒ ƒ q t  | t ƒ ræ | \ } } } t  | t ƒ r« t | | j	 ƒ } | j	 } n | j	 } t | | j	 ƒ } | d j t
 | | | ƒ ƒ q | d k sø t ‚ | d k r | j g  ƒ q q Wt d „  | Dƒ ƒ S(   NiÿÿÿÿR:   R;   c         s` s   |  ] } t  | ƒ Vq d  S(   N(   t   all(   RF   t   item(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pys	   <genexpr>â   s    (   s   ands   or(   R?   RI   R<   R   RJ   t   appendt   _evaluate_markersR    R\   R   RX   t   any(	   t   markersRZ   t   groupsRM   RO   RU   RP   t	   lhs_valuet	   rhs_value(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR`   Ê   s"    		 c         C` sF   d j  |  ƒ } |  j } | d k rB | | d t |  j ƒ 7} n  | S(   Ns   {0.major}.{0.minor}.{0.micro}t   finali    (   R   t   releaselevelR   t   serial(   t   infot   versiont   kind(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   format_full_versionå   s
    	c          C` sÁ   t  t d ƒ r0 t t j j ƒ }  t j j } n d }  d } i | d 6|  d 6t j d 6t j ƒ  d 6t j	 ƒ  d 6t j
 ƒ  d	 6t j ƒ  d
 6t j ƒ  d 6t j ƒ  d 6t j ƒ  d  d 6t j d 6S(   Nt   implementationt   0RQ   R$   R"   R,   R(   R&   R)   R'   R%   R#   i   R*   R+   (   t   hasattrt   sysRl   Rm   Rj   R[   t   ost   platformt   machinet   releaset   systemR*   R-   (   t   iverR$   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR   í   s"    
c           B` s/   e  Z d  „  Z d „  Z d „  Z d d „ Z RS(   c         C` se   y t  t j | ƒ ƒ |  _ WnB t k
 r` } d j | | | j | j d !ƒ } t | ƒ ‚ n Xd  S(   Ns+   Invalid marker: {0!r}, parse error at {1!r}i   (   R@   t   MARKERt   parseStringt   _markersR   R   t   locR   (   R   RM   t   et   err_str(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR     s    c         C` s   t  |  j ƒ S(   N(   RD   Ry   (   R   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR     s    c         C` s   d j  t |  ƒ ƒ S(   Ns   <Marker({0!r})>(   R   R   (   R   (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR     s    c         C` s5   t  ƒ  } | d k	 r% | j | ƒ n  t |  j | ƒ S(   s$  Evaluate a marker.

        Return the boolean from evaluating the given marker against the
        environment. environment is an optional argument to override all or
        part of the determined environment.

        The environment is determined from the current Python process.
        N(   R   RT   t   updateR`   Ry   (   R   RZ   t   current_environment(    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   evaluate  s    		N(   R   R   R   R   R   RT   R   (    (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyR     s   			(A   t
   __future__R    R   R   t   operatorRq   Rr   Rp   t   pip._vendor.pyparsingR   R   R   R   R   R   R	   R
   R   t   Lt   _compatR   t
   specifiersR   R   t   __all__t
   ValueErrorR   R   R   t   objectR   R    R!   t   VARIABLER/   t   setParseActiont   VERSION_CMPt	   MARKER_OPt   MARKER_VALUEt   BOOLOPt
   MARKER_VARt   MARKER_ITEMt   suppresst   LPARENt   RPARENt   MARKER_EXPRt   MARKER_ATOMRw   R@   t   TrueRD   t   ltt   let   eqt   net   get   gtRS   RX   RY   R\   R`   Rl   R   R   (    (    (    sn   /private/var/folders/3n/6h2rwf155rn1m71wwyxn79n80000gn/T/pip-build-IcAT_k/pip/pip/_vendor/packaging/markers.pyt   <module>   sx   ""	©
	E
		






						