
~^Yc           @   s   d    Z  d   Z d   Z d S(   c         C   s   i  } i  } xt |  D]l } d | j  | j f } t t | |    } | rW | | | <n  t t | |    } | r | | | <q q W| | f S(   Ns   %s==%s(   t   project_namet   versiont   listt   get_missing_reqst   get_incompatible_reqs(   t   installed_distst   missing_reqs_dictt   incompatible_reqs_dictt   distt   keyt   missing_reqst   incompatible_reqs(    (    s1   /tmp/pip-build-QubATO/pip/pip/operations/check.pyt   check_requirements   s    c         c   sd   t  d   | D  } t    } x> |  j   D]0 } | j j   | k r, | j |  | Vq, q, Wd S(   s\   Return all of the requirements of `dist` that aren't present in
    `installed_dists`.

    c         s   s   |  ] } | j  j   Vq d  S(   N(   R    t   lower(   t   .0t   d(    (    s1   /tmp/pip-build-QubATO/pip/pip/operations/check.pys	   <genexpr>   s    N(   t   sett   requiresR    R   t   add(   R   R   t   installed_namest   missing_requirementst   requirement(    (    s1   /tmp/pip-build-QubATO/pip/pip/operations/check.pyR      s    	c         c   sq   i  } x | D] } | | | j  <q WxF |  j   D]8 } | j | j   } | r1 | | k r1 | | f Vq1 q1 Wd S(   sy   Return all of the requirements of `dist` that are present in
    `installed_dists`, but have incompatible versions.

    N(   R    R   t   get(   R   R   t   installed_dists_by_namet   installed_distR   t   present_dist(    (    s1   /tmp/pip-build-QubATO/pip/pip/operations/check.pyR   $   s    N(   R   R   R   (    (    (    s1   /tmp/pip-build-QubATO/pip/pip/operations/check.pyt   <module>   s   		