Skip to content

Commit

Permalink
[wpt] Avoid race condition during module install (#15614)
Browse files Browse the repository at this point in the history
  • Loading branch information
jugglinmike authored and Marcos Cáceres committed Jul 23, 2019
1 parent 88b5d1a commit f18234e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tools/wpt/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,13 @@ def start(self):
self.activate()

def install(self, *requirements):
call(self.pip_path, "install", *requirements)
# `--prefer-binary` guards against race conditions when installation
# occurs while packages are in the process of being published.
call(self.pip_path, "install", "--prefer-binary", *requirements)

def install_requirements(self, requirements_path):
call(self.pip_path, "install", "-r", requirements_path)
# `--prefer-binary` guards against race conditions when installation
# occurs while packages are in the process of being published.
call(
self.pip_path, "install", "--prefer-binary", "-r", requirements_path
)

0 comments on commit f18234e

Please sign in to comment.