Bug 1607470, unset __PYVENV_LAUNCHER__ for virtualenvs, r=firefox-build-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 https://github.com/python/cpython/pull/9516.

Differential Revision: https://phabricator.services.mozilla.com/D59853

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Axel Hecht 2020-01-14 23:06:54 +00:00
parent 14bc4dc4ab
commit c32c2767c5

View File

@ -188,6 +188,9 @@ class VirtualenvManager(object):
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)