Commit 27432008 authored by Xavier Thompson's avatar Xavier Thompson

Fix accidental changes to PYTHONPATH in os.environ

When generating an environment dict for subprocess calls to pip,
os.environ was accidentally modified despite efforts to copy it
and modify only the copy, as copy.copy(os.environ) is not enough.
parent d2d90eb2
...@@ -1696,8 +1696,8 @@ def call_pip_install(spec, dest): ...@@ -1696,8 +1696,8 @@ def call_pip_install(spec, dest):
else: else:
args.append('--no-python-version-warning') args.append('--no-python-version-warning')
env = copy.copy(os.environ) env = os.environ.copy()
python_path = copy.copy(pip_path) python_path = pip_path[:]
python_path.append(env.get('PYTHONPATH', '')) python_path.append(env.get('PYTHONPATH', ''))
env['PYTHONPATH'] = os.pathsep.join(python_path) env['PYTHONPATH'] = os.pathsep.join(python_path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment