Merge pull request #3226 from pypa/bugfix/3222

Don't disable --user when --system is passed
This commit is contained in:
Dan Ryan
2018-11-16 23:16:13 -05:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -0,0 +1 @@
Pipenv will no longer disable user-mode installation when the ``--system`` flag is passed in.
+4 -2
View File
@@ -725,7 +725,8 @@ def batch_install(deps_list, procs, failed_deps_queue,
extra_indexes = indexes[1:]
with vistir.contextmanagers.temp_environ():
os.environ["PIP_USER"] = vistir.compat.fs_str("0")
if not allow_global:
os.environ["PIP_USER"] = vistir.compat.fs_str("0")
c = pip_install(
dep,
ignore_hashes=any([ignore_hashes, dep.editable, dep.is_vcs]),
@@ -1899,7 +1900,8 @@ def do_install(
)
# pip install:
with vistir.contextmanagers.temp_environ(), create_spinner("Installing...") as sp:
os.environ["PIP_USER"] = vistir.compat.fs_str("0")
if not system:
os.environ["PIP_USER"] = vistir.compat.fs_str("0")
try:
pkg_requirement = Requirement.from_line(pkg_line)
except ValueError as e: