Bug 1466211 - Remove broken call to initial virtualenv when using pipenv; r?ahal draft
authorDave Hunt <dhunt@mozilla.com>
Sun, 10 Jun 2018 17:36:49 +0100
changeset 806520 4235735b19d07d831f8655949c3bb65d3358c469
parent 806519 e0be4c648692fdac5a90069215050495ff3d0ae1
child 806521 87d9c3612dc0c3634e8b12b72fcc718ebf15f7ec
push id112905
push userbmo:dave.hunt@gmail.com
push dateMon, 11 Jun 2018 01:31:31 +0000
reviewersahal
bugs1466211
milestone62.0a1
Bug 1466211 - Remove broken call to initial virtualenv when using pipenv; r?ahal MozReview-Commit-ID: Bcx67IwQxTa
build/moz.configure/init.configure
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -195,17 +195,16 @@ option(env='PYTHON', nargs=1, help='Pyth
 
 # Setup python virtualenv
 # ==============================================================
 
 
 @depends('PYTHON', check_build_environment, mozconfig, '--help')
 @imports('os')
 @imports('sys')
-@imports('subprocess')
 @imports(_from='mozbuild.configure.util', _import='LineIO')
 @imports(_from='mozbuild.virtualenv', _import='VirtualenvManager')
 @imports(_from='mozbuild.virtualenv', _import='verify_python_version')
 @imports('distutils.sysconfig')
 def virtualenv_python(env_python, build_env, mozconfig, help):
     if help:
         return
 
@@ -251,24 +250,16 @@ def virtualenv_python(env_python, build_
         python = sys.executable
 
     if not manager.up_to_date(python):
         log.info('Creating Python environment')
         manager.build(python)
 
     python = normsep(manager.python_path)
 
-    if python != normsep(sys.executable):
-        log.info('Reexecuting in the virtualenv')
-        if env_python:
-            del os.environ['PYTHON']
-        # One would prefer to use os.execl, but that's completely borked on
-        # Windows.
-        sys.exit(subprocess.call([python] + sys.argv))
-
     # We are now in the virtualenv
     if not distutils.sysconfig.get_python_lib():
         die('Could not determine python site packages directory')
 
     return python
 
 
 set_config('PYTHON', virtualenv_python)