Skip to content

Commit

Permalink
Bug 1607470, unset __PYVENV_LAUNCHER__ for virtualenvs, r=firefox-bui…
Browse files Browse the repository at this point in the history
…ld-system-reviewers,rstewart

The __PYVENV_LAUNCHER__ is set on macos to indicate which
python to use. Sadly, keeping this set confuses pip in
virtualenvs.
This corresponds to python/cpython#9516.

Differential Revision: https://phabricator.services.mozilla.com/D59853
  • Loading branch information
Pike committed Jan 14, 2020
1 parent 0f9fa5f commit 08dcfdf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/mozbuild/mozbuild/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ def ensure(self, python=sys.executable):
This should be the main API used from this class as it is the
highest-level.
"""
# __PYVENV_LAUNCHER__ confuses pip about the python interpreter
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1607470
os.environ.pop('__PYVENV_LAUNCHER__', None)
if self.up_to_date(python):
return self.virtualenv_root
return self.build(python)
Expand Down

0 comments on commit 08dcfdf

Please sign in to comment.