From c32c2767c5f4a76935299c77c2c53bc1c74c5551 Mon Sep 17 00:00:00 2001 From: Axel Hecht Date: Tue, 14 Jan 2020 23:06:54 +0000 Subject: [PATCH] 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 --- python/mozbuild/mozbuild/virtualenv.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/mozbuild/mozbuild/virtualenv.py b/python/mozbuild/mozbuild/virtualenv.py index a6ebd8c0808b..ff4e71fe264c 100644 --- a/python/mozbuild/mozbuild/virtualenv.py +++ b/python/mozbuild/mozbuild/virtualenv.py @@ -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)