Commit e521348b authored by Xavier Thompson's avatar Xavier Thompson

[bug] 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 ac3f5e4c
......@@ -1683,8 +1683,8 @@ def call_pip_install(spec, dest):
else:
args.append('--no-python-version-warning')
env = copy.copy(os.environ)
python_path = copy.copy(pip_path)
env = os.environ.copy()
python_path = pip_path[:]
python_path.append(env.get('PYTHONPATH', ''))
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