Skip to content

Commit

Permalink
fix: bench update compatible venv installed pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
gavindsouza committed Nov 29, 2019
1 parent 0a6ffd1 commit cd711b0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bench/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,10 @@ def update_npm_packages(bench_path='.'):

def install_requirements(pip, req_file, user=False):
if os.path.exists(req_file):
# sys.real_prefix exists only in a virtualenv
if hasattr(sys, 'real_prefix'):
user = False

user_flag = "--user" if user else ""
exec_cmd("{pip} install {user_flag} -q -U -r {req_file}".format(pip=pip, user_flag=user_flag, req_file=req_file))

Expand Down

0 comments on commit cd711b0

Please sign in to comment.