From c963013858dd63837d5cc78e61662e57f269a3c4 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Wed, 11 Sep 2019 23:56:27 +0200 Subject: [PATCH] Fixing weird issue with the shebang of pip installed scripts and __PYVENV_LAUNCHER__ --- cibuildwheel/macos.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index 1a9b90de..9026fab4 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -127,6 +127,9 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef venv_dir = tempfile.mkdtemp() call(['python', '-m', 'virtualenv', venv_dir], env=env) env['PATH'] = os.pathsep.join([os.path.join(venv_dir, 'bin'), env['PATH']]) + # Some weird issue with the shebang of installed scripts + # See https://github.com/theacodes/nox/issues/44 and https://github.com/pypa/virtualenv/issues/620 + env.pop('__PYVENV_LAUNCHER__', None) # check that we are using the Python from the virtual environment call(['which', 'python'], env=env)