Skip to content

Commit

Permalink
Allow bypass of the patched prefix for troubleshooting #36.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Nov 12, 2018
1 parent 5cd07ea commit 5aa7b62
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
5.2
---

#36: Allow bypass of workaround for pip #4106
by setting ``PIP_RUN_NO_PATCH_PREFIX``.

5.1
---

Expand Down
3 changes: 3 additions & 0 deletions pip_run/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ def _patch_prefix():
To workaround pypa/pip#4106, override the system prefix with
a user prefix, restoring the original file after.
"""
if os.environ.get('PIP_RUN_NO_PATCH_PREFIX'):
yield
return
cfg_fn = os.path.expanduser('~/.pydistutils.cfg')
with _save_file(cfg_fn):
with open(cfg_fn, 'w') as cfg:
Expand Down

0 comments on commit 5aa7b62

Please sign in to comment.