ó
Ð²Ebc           @` sä  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 Z d d l	 m
 Z
 m Z d d l m Z d d l m Z d d l m Z m Z m Z e r&d  d l m Z m Z m Z m Z m Z m Z m Z m Z e e e f Z e e e e f Z e e e g e  f Z! n  d	 e" f d
 „  ƒ  YZ# d e e j$ e% ƒ f d „  ƒ  YZ& d e& f d „  ƒ  YZ' d e' f d „  ƒ  YZ( d „  Z) d e' f d „  ƒ  YZ* e j+ d ƒ Z, d „  Z- d „  Z. d e& f d „  ƒ  YZ/ d S(   i    (   t   absolute_importt   divisiont   print_functionNi   (   t   string_typest   with_metaclass(   t   TYPE_CHECKING(   t   canonicalize_version(   t   Versiont   LegacyVersiont   parse(   t   Listt   Dictt   Uniont   Iterablet   Iteratort   Optionalt   Callablet   Tuplet   InvalidSpecifierc           B` s   e  Z d  Z RS(   sH   
    An invalid specifier was found, users should refer to PEP 440.
    (   t   __name__t
   __module__t   __doc__(    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR      s   t   BaseSpecifierc           B` sž   e  Z e j d  „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z e j d „  ƒ Z	 e	 j
 d „  ƒ Z	 e j d d „ ƒ Z e j d d „ ƒ Z RS(	   c         C` s   d S(   sŽ   
        Returns the str representation of this Specifier like object. This
        should be representative of the Specifier itself.
        N(    (   t   self(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __str__    t    c         C` s   d S(   sF   
        Returns a hash value for this Specifier like object.
        N(    (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __hash__(   R   c         C` s   d S(   sq   
        Returns a boolean representing whether or not the two Specifier like
        objects are equal.
        N(    (   R   t   other(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __eq__/   R   c         C` s   d S(   su   
        Returns a boolean representing whether or not the two Specifier like
        objects are not equal.
        N(    (   R   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __ne__7   R   c         C` s   d S(   sg   
        Returns whether or not pre-releases as a whole are allowed by this
        specifier.
        N(    (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   prereleases?   R   c         C` s   d S(   sd   
        Sets whether or not pre-releases as a whole are allowed by this
        specifier.
        N(    (   R   t   value(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   G   R   c         C` s   d S(   sR   
        Determines if the given item is contained within this specifier.
        N(    (   R   t   itemR   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   containsO   R   c         C` s   d S(   s•   
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        N(    (   R   t   iterableR   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   filterV   R   N(   R   R   t   abct   abstractmethodR   R   R   R   t   abstractpropertyR   t   settert   NoneR!   R#   (    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR      s   t   _IndividualSpecifierc           B` sË   e  Z i  Z d  d d „ Z d „  Z d „  Z e d „  ƒ Z d „  Z	 d „  Z
 d „  Z d „  Z d	 „  Z e d
 „  ƒ Z e d „  ƒ Z e d „  ƒ Z e j d „  ƒ Z d „  Z d d „ Z d d „ Z RS(   R   c         C` sj   |  j  j | ƒ } | s0 t d j | ƒ ƒ ‚ n  | j d ƒ j ƒ  | j d ƒ j ƒ  f |  _ | |  _ d  S(   Ns   Invalid specifier: '{0}'t   operatort   version(   t   _regext   searchR   t   formatt   groupt   stript   _spect   _prereleases(   R   t   specR   t   match(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __init__c   s    c         C` sF   |  j  d  k	 r! d j |  j ƒ n d } d j |  j j t |  ƒ | ƒ S(   Ns   , prereleases={0!r}R   s   <{0}({1!r}{2})>(   R2   R(   R.   R   t	   __class__R   t   str(   R   t   pre(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __repr__q   s    !c         C` s   d j  |  j Œ  S(   Ns   {0}{1}(   R.   R1   (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   {   s    c         C` s   |  j  d t |  j  d ƒ f S(   Ni    i   (   R1   R   (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _canonical_spec   s    c         C` s   t  |  j ƒ S(   N(   t   hashR:   (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   „   s    c         C` sf   t  | t ƒ r@ y |  j t | ƒ ƒ } WqV t k
 r< t SXn t  | |  j ƒ sV t S|  j | j k S(   N(   t
   isinstanceR   R6   R7   R   t   NotImplementedR:   (   R   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   ˆ   s    c         C` sf   t  | t ƒ r@ y |  j t | ƒ ƒ } WqV t k
 r< t SXn t  | |  j ƒ sV t S|  j | j k S(   N(   R<   R   R6   R7   R   R=   R1   (   R   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   ”   s    c         C` s#   t  |  d j |  j | ƒ ƒ } | S(   Ns   _compare_{0}(   t   getattrR.   t
   _operators(   R   t   opt   operator_callable(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _get_operator    s    c         C` s(   t  | t t f ƒ s$ t | ƒ } n  | S(   N(   R<   R   R   R	   (   R   R+   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _coerce_version§   s    c         C` s   |  j  d S(   Ni    (   R1   (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR*   ­   s    c         C` s   |  j  d S(   Ni   (   R1   (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR+   ²   s    c         C` s   |  j  S(   N(   R2   (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   ·   s    c         C` s   | |  _  d  S(   N(   R2   (   R   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   ¼   s    c         C` s   |  j  | ƒ S(   N(   R!   (   R   R    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __contains__Á   s    c         C` s]   | d  k r |  j } n  |  j | ƒ } | j r; | r; t S|  j |  j ƒ } | | |  j ƒ S(   N(   R(   R   RC   t   is_prereleaset   FalseRB   R*   R+   (   R   R    R   t   normalized_itemRA   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR!   Å   s    c         c` s¾   t  } g  } i | d  k	 r! | n t d 6} xf | D]^ } |  j | ƒ } |  j | |  r2 | j r‚ | pn |  j r‚ | j | ƒ q t } | Vq2 q2 W| rº | rº x | D] } | Vq¨ Wn  d  S(   NR   (   RF   R(   t   TrueRC   R!   RE   R   t   append(   R   R"   R   t   yieldedt   found_prereleasest   kwR+   t   parsed_version(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR#   Û   s    	N(   R   R   R?   R(   R5   R9   R   t   propertyR:   R   R   R   RB   RC   R*   R+   R   R'   RD   R!   R#   (    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR)   _   s"   	
							t   LegacySpecifierc           B` s°   e  Z d  Z e j d e d e j e j Bƒ Z i d d 6d d 6d d 6d	 d
 6d d 6d d 6Z d d d „ Z
 d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   sÛ  
        (?P<operator>(==|!=|<=|>=|<|>))
        \s*
        (?P<version>
            [^,;\s)]* # Since this is a "legacy" specifier, and the version
                      # string can be just about anything, we match everything
                      # except for whitespace, a semi-colon for marker support,
                      # a closing paren since versions can be enclosed in
                      # them, and a comma since it's a version separator.
        )
        s   ^\s*s   \s*$t   equals   ==t	   not_equals   !=t   less_than_equals   <=t   greater_than_equals   >=t	   less_thant   <t   greater_thant   >R   c         C` s-   t  t |  ƒ j | | ƒ t j d t ƒ d  S(   NsZ   Creating a LegacyVersion has been deprecated and will be removed in the next major release(   t   superRO   R5   t   warningst   warnt   DeprecationWarning(   R   R3   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR5     s    c         C` s(   t  | t ƒ s$ t t | ƒ ƒ } n  | S(   N(   R<   R   R7   (   R   R+   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRC   !  s    c         C` s   | |  j  | ƒ k S(   N(   RC   (   R   t   prospectiveR3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _compare_equal'  s    c         C` s   | |  j  | ƒ k S(   N(   RC   (   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _compare_not_equal+  s    c         C` s   | |  j  | ƒ k S(   N(   RC   (   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _compare_less_than_equal/  s    c         C` s   | |  j  | ƒ k S(   N(   RC   (   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _compare_greater_than_equal3  s    c         C` s   | |  j  | ƒ k  S(   N(   RC   (   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _compare_less_than7  s    c         C` s   | |  j  | ƒ k S(   N(   RC   (   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _compare_greater_than;  s    N(   R   R   t
   _regex_strt   ret   compilet   VERBOSEt
   IGNORECASER,   R?   R(   R5   RC   R]   R^   R_   R`   Ra   Rb   (    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRO   þ   s"   $

						c         ` s"   t  j ˆ  ƒ ‡  f d †  ƒ } | S(   Nc         ` s#   t  | t ƒ s t Sˆ  |  | | ƒ S(   N(   R<   R   RF   (   R   R\   R3   (   t   fn(    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   wrappedD  s    (   t	   functoolst   wraps(   Rh   Ri   (    (   Rh   s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _require_version_compare@  s    t	   Specifierc           B` s  e  Z d  Z e j d e d e j e j Bƒ Z i d d 6d d 6d d 6d	 d
 6d d 6d d 6d d 6d d 6Z e	 d „  ƒ Z
 e	 d „  ƒ Z e	 d „  ƒ Z e	 d „  ƒ Z e	 d „  ƒ Z e	 d „  ƒ Z e	 d „  ƒ Z d „  Z e d „  ƒ Z e j d „  ƒ Z RS(   s  
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s]*    # We just match everything, except for whitespace
                          # since we are only testing for strict identity.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?

                # You cannot use a wild card and a dev or local version
                # together so group them with a | and make them optional.
                (?:
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                    |
                    \.\*  # Wild card syntax of .*
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (a|b|c|rc|alpha|beta|pre|preview)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        s   ^\s*s   \s*$t
   compatibles   ~=RP   s   ==RQ   s   !=RR   s   <=RS   s   >=RT   RU   RV   RW   t	   arbitrarys   ===c         C` sf   d j  t t j d „  t | ƒ ƒ ƒ d  ƒ } | d 7} |  j d ƒ | | ƒ oe |  j d ƒ | | ƒ S(   Nt   .c         S` s   |  j  d ƒ o |  j  d ƒ S(   Nt   postt   dev(   t
   startswith(   t   x(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   <lambda>Ê  R   iÿÿÿÿs   .*s   >=s   ==(   t   joint   listt	   itertoolst	   takewhilet   _version_splitRB   (   R   R\   R3   t   prefix(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _compare_compatibleº  s    

$c   	      C` s¤   | j  d ƒ ro t | j ƒ } t | d  ƒ } t t | ƒ ƒ } | t | ƒ  } t | | ƒ \ } } | | k St | ƒ } | j s– t | j ƒ } n  | | k Sd  S(   Ns   .*iþÿÿÿ(   t   endswithR   t   publicRz   R7   t   lent   _pad_versiont   local(	   R   R\   R3   t
   split_spect   split_prospectivet   shortened_prospectivet   padded_spect   padded_prospectivet   spec_version(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR]   ×  s    
	c         C` s   |  j  | | ƒ S(   N(   R]   (   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR^      s    c         C` s   t  | j ƒ t  | ƒ k S(   N(   R   R~   (   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR_     s    c         C` s   t  | j ƒ t  | ƒ k S(   N(   R   R~   (   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR`     s    c         C` sX   t  | ƒ } | | k  s t S| j rT | j rT t  | j ƒ t  | j ƒ k rT t Sn  t S(   N(   R   RF   RE   t   base_versionRH   (   R   R\   t   spec_strR3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRa     s    c         C` sŒ   t  | ƒ } | | k s t S| j rT | j rT t  | j ƒ t  | j ƒ k rT t Sn  | j d  k	 rˆ t  | j ƒ t  | j ƒ k rˆ t Sn  t S(   N(   R   RF   t   is_postreleaseRˆ   R   R(   RH   (   R   R\   R‰   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRb   2  s    c         C` s"   t  | ƒ j ƒ  t  | ƒ j ƒ  k S(   N(   R7   t   lower(   R   R\   R3   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   _compare_arbitraryS  s    c         C` ss   |  j  d  k	 r |  j  S|  j \ } } | d k ro | d k rY | j d ƒ rY | d  } n  t | ƒ j ro t Sn  t S(	   Ns   ==s   >=s   <=s   ~=s   ===s   .*iþÿÿÿ(   s   ==s   >=s   <=s   ~=s   ===(   R2   R(   R1   R}   R	   RE   RH   RF   (   R   R*   R+   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   W  s    c         C` s   | |  _  d  S(   N(   R2   (   R   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   q  s    (   R   R   Rc   Rd   Re   Rf   Rg   R,   R?   Rl   R|   R]   R^   R_   R`   Ra   Rb   RŒ   RN   R   R'   (    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRm   N  s*   ]$
)		!	s   ^([0-9]+)((?:a|b|c|rc)[0-9]+)$c         C` s\   g  } xO |  j  d ƒ D]> } t j | ƒ } | rG | j | j ƒ  ƒ q | j | ƒ q W| S(   NRp   (   t   splitt   _prefix_regexR-   t   extendt   groupsRI   (   R+   t   resultR    R4   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRz   z  s    c      	   C` s  g  g  } } | j  t t j d „  |  ƒ ƒ ƒ | j  t t j d „  | ƒ ƒ ƒ | j  |  t | d ƒ ƒ | j  | t | d ƒ ƒ | j d d g t d t | d ƒ t | d ƒ ƒ ƒ | j d d g t d t | d ƒ t | d ƒ ƒ ƒ t t j | Œ  ƒ t t j | Œ  ƒ f S(   Nc         S` s
   |  j  ƒ  S(   N(   t   isdigit(   Rt   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRu   ‹  R   c         S` s
   |  j  ƒ  S(   N(   R’   (   Rt   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRu   Œ  R   i    i   t   0(   RI   Rw   Rx   Ry   R   t   insertt   maxt   chain(   t   leftt   rightt
   left_splitt   right_split(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR€   †  s    ""88t   SpecifierSetc           B` s¡   e  Z d  d d „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d	 „  Z e d
 „  ƒ Z e j d „  ƒ Z d „  Z d d „ Z d d „ Z RS(   R   c         C` s¨   g  | j  d ƒ D] } | j ƒ  r | j ƒ  ^ q } t ƒ  } xL | D]D } y | j t | ƒ ƒ WqD t k
 r‡ | j t | ƒ ƒ qD XqD Wt | ƒ |  _ | |  _	 d  S(   Nt   ,(
   R   R0   t   sett   addRm   R   RO   t	   frozensett   _specsR2   (   R   t
   specifiersR   t   st   split_specifierst   parsedt	   specifier(    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR5   š  s    4	c         C` s=   |  j  d  k	 r! d j |  j ƒ n d } d j t |  ƒ | ƒ S(   Ns   , prereleases={0!r}R   s   <SpecifierSet({0!r}{1})>(   R2   R(   R.   R   R7   (   R   R8   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR9   ±  s    !c         C` s    d j  t d „  |  j Dƒ ƒ ƒ S(   NRœ   c         s` s   |  ] } t  | ƒ Vq d  S(   N(   R7   (   t   .0R¢   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pys	   <genexpr>½  s    (   Rv   t   sortedR    (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   »  s    c         C` s   t  |  j ƒ S(   N(   R;   R    (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   ¿  s    c         C` sÞ   t  | t ƒ r t | ƒ } n t  | t ƒ s1 t St ƒ  } t |  j | j Bƒ | _ |  j d  k r€ | j d  k	 r€ | j | _ nZ |  j d  k	 r­ | j d  k r­ |  j | _ n- |  j | j k rÎ |  j | _ n t d ƒ ‚ | S(   NsF   Cannot combine SpecifierSets with True and False prerelease overrides.(	   R<   R   R›   R=   RŸ   R    R2   R(   t
   ValueError(   R   R   R¥   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __and__Ã  s    		c         C` sM   t  | t t f ƒ r* t t | ƒ ƒ } n t  | t ƒ s= t S|  j | j k S(   N(   R<   R   R)   R›   R7   R=   R    (   R   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   Û  s
    c         C` sM   t  | t t f ƒ r* t t | ƒ ƒ } n t  | t ƒ s= t S|  j | j k S(   N(   R<   R   R)   R›   R7   R=   R    (   R   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   ä  s
    c         C` s   t  |  j ƒ S(   N(   R   R    (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __len__í  s    c         C` s   t  |  j ƒ S(   N(   t   iterR    (   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   __iter__ñ  s    c         C` s:   |  j  d  k	 r |  j  S|  j s# d  St d „  |  j Dƒ ƒ S(   Nc         s` s   |  ] } | j  Vq d  S(   N(   R   (   R¦   R¢   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pys	   <genexpr>  s    (   R2   R(   R    t   any(   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR   õ  s
    	c         C` s   | |  _  d  S(   N(   R2   (   R   R   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR     s    c         C` s   |  j  | ƒ S(   N(   R!   (   R   R    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyRD     s    c         ` sp   t  ˆ  t t f ƒ s$ t ˆ  ƒ ‰  n  ˆ d  k r< |  j ‰ n  ˆ rP ˆ  j rP t St ‡  ‡ f d †  |  j	 Dƒ ƒ S(   Nc         3` s$   |  ] } | j  ˆ  d  ˆ ƒVq d S(   R   N(   R!   (   R¦   R¢   (   R    R   (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pys	   <genexpr>+  s    (
   R<   R   R   R	   R(   R   RE   RF   t   allR    (   R   R    R   (    (   R    R   s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR!     s    c         C` s  | d  k r |  j } n  |  j rT x, |  j D]! } | j | d t | ƒ ƒ} q+ W| Sg  } g  } xƒ | D]{ } t | t t f ƒ s‘ t | ƒ } n | } t | t ƒ r¬ qg n  | j	 rÕ | rÕ | sâ | j
 | ƒ qâ qg | j
 | ƒ qg W| r| r| d  k r| S| Sd  S(   NR   (   R(   R   R    R#   t   boolR<   R   R   R	   RE   RI   (   R   R"   R   R3   t   filteredRK   R    RM   (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR#   -  s*    
	N(   R   R   R(   R5   R9   R   R   R©   R   R   Rª   R¬   RN   R   R'   RD   R!   R#   (    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyR›   ™  s   	
										(0   t
   __future__R    R   R   R$   Rj   Rx   Rd   RY   t   _compatR   R   t   _typingR   t   utilsR   R+   R   R   R	   t   typingR
   R   R   R   R   R   R   R   t   ParsedVersionR7   t   UnparsedVersionR¯   t   CallableOperatorR¨   R   t   ABCMetat   objectR   R)   RO   Rl   Rm   Re   RŽ   Rz   R€   R›   (    (    (    s=   /tmp/pip-build-UPPWic/pip/pip/_vendor/packaging/specifiers.pyt   <module>   s2   :"@ŸB	ÿ *		