Mercurial > public > mercurial-scm > hg-stable
diff tests/hghave.py @ 32746:a6e4c4218b71
hghave: add check for virtualenv
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 06 Jun 2017 11:16:10 -0400 |
parents | c2b7fb580794 |
children | 9cf74abd1252 |
line wrap: on
line diff
--- a/tests/hghave.py Tue Jun 06 11:02:30 2017 -0400 +++ b/tests/hghave.py Tue Jun 06 11:16:10 2017 -0400 @@ -634,3 +634,12 @@ @check("devfull", "/dev/full special file") def has_dev_full(): return os.path.exists('/dev/full') + +@check("virtualenv", "Python virtualenv support") +def has_virtualenv(): + try: + import virtualenv + virtualenv.ACTIVATE_SH + return True + except ImportError: + return False