supporting version constrain similar to real pip

Original PR: https://github.com/ansible/ansible/pull/9064/files?diff=split