##// END OF EJS Templates
tests: look for ensurepip before using venv...
Gregory Szorc -
r43730:ca0cd0a1 stable
parent child Browse files
Show More
@@ -829,6 +829,17 b' def has_dev_full():'
829 829 return os.path.exists('/dev/full')
830 830
831 831
832 @check("ensurepip", "ensurepip module")
833 def has_ensurepip():
834 try:
835 import ensurepip
836
837 ensurepip.bootstrap
838 return True
839 except ImportError:
840 return False
841
842
832 843 @check("virtualenv", "Python virtualenv support")
833 844 def has_virtualenv():
834 845 try:
@@ -241,12 +241,15 b' the last test in this file, because we d'
241 241 shell environment in order to make the virtualenv work reliably.
242 242
243 243 On Python 3, we use the venv module, which is part of the standard library.
244 But some Linux distros strip out this module's functionality involving pip,
245 so we have to look for the ensurepip module, which these distros strip out
246 completely.
244 247 On Python 2, we use the 3rd party virtualenv module, if available.
245 248
246 249 $ cd $TESTTMP
247 250 $ unset PYTHONPATH
248 251
249 #if py3
252 #if py3 ensurepip
250 253 $ "$PYTHON" -m venv installenv >> pip.log
251 254
252 255 Note: we use this weird path to run pip and hg to avoid platform differences,
General Comments 0
You need to be logged in to leave comments. Login now