diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-07-17 15:58:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-17 15:58:12 -0700 |
commit | e7a55ae55ee0091095b8a460b3088440f352dd2e (patch) | |
tree | 0e1512759e9c5c5af536df34087e3f0cadf9150e /python/mach_bootstrap.py | |
parent | 8c1be9b07ce2dbdd1fe696e3315bc4528846b419 (diff) | |
parent | 7002fbedd73c4c240ea1e1593b1275b0df79c5d0 (diff) | |
download | servo-e7a55ae55ee0091095b8a460b3088440f352dd2e.tar.gz servo-e7a55ae55ee0091095b8a460b3088440f352dd2e.zip |
Auto merge of #10618 - zwn:fix-windows-build, r=larsbergstrom
Ensure virtualenv activates
Fixes #10595. For more info see #10595 or the commit message.
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10618)
<!-- Reviewable:end -->
Diffstat (limited to 'python/mach_bootstrap.py')
-rw-r--r-- | python/mach_bootstrap.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/mach_bootstrap.py b/python/mach_bootstrap.py index 645ae1cf686..0b5a31c7459 100644 --- a/python/mach_bootstrap.py +++ b/python/mach_bootstrap.py @@ -9,7 +9,6 @@ import platform import subprocess import sys from distutils.spawn import find_executable -from pipes import quote SEARCH_PATHS = [ os.path.join("python", "tidy"), @@ -121,7 +120,11 @@ def _activate_virtualenv(topdir): sys.exit("Python virtualenv failed to execute properly: {}" .format(process.communicate()[1])) - execfile(activate_path, dict(__file__=quote(activate_path))) + execfile(activate_path, dict(__file__=activate_path)) + + python = find_executable("python") + if python is None or not python.startswith(virtualenv_path): + sys.exit("Python virtualenv failed to activate.") # TODO: Right now, we iteratively install all the requirements by invoking # `pip install` each time. If it were the case that there were conflicting |