3 ]6@sddZddZddZdS)cCsbi}i}xP|D]H}d|j|jf}tt||}|r<|||<tt||}|r|||<qW||fS)Nz%s==%s) project_nameversionlistget_missing_reqsget_incompatible_reqs)installed_distsmissing_reqs_dictincompatible_reqs_dictdistkey missing_reqsincompatible_reqsr 3/tmp/pip-build-8jg9gmni/pip/pip/operations/check.pycheck_requirementss   rccsLtdd|D}t}x.|jD]"}|jj|kr"|j||Vq"WdS)z\Return all of the requirements of `dist` that aren't present in `installed_dists`. css|]}|jjVqdS)N)rlower).0dr r r sz#get_missing_reqs..N)setrequiresrradd)r rinstalled_namesmissing_requirements requirementr r rrs  rccsTi}x|D]}|||j<q Wx2|jD]&}|j|j}|r&||kr&||fVq&WdS)zyReturn all of the requirements of `dist` that are present in `installed_dists`, but have incompatible versions. N)rrget)r rinstalled_dists_by_nameinstalled_distr present_distr r rr$s   rN)rrrr r r rs