Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't override PIP_NO_DEPS by default #3800

Merged
merged 2 commits into from
Jun 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 25 additions & 39 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions news/3763.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Pipenv will no longer forcibly override ``PIP_NO_DEPS`` on all vcs and file dependencies as resolution happens on these in a pre-lock step.
17 changes: 10 additions & 7 deletions pipenv/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,11 +680,12 @@ def _cleanup_procs(procs, failed_deps_queue, retry=True):


def batch_install(deps_list, procs, failed_deps_queue,
requirements_dir, no_deps=False, ignore_hashes=False,
requirements_dir, no_deps=True, ignore_hashes=False,
allow_global=False, blocking=False, pypi_mirror=None,
retry=True):
from .vendor.requirementslib.models.utils import strip_extras_markers_from_requirement
failed = (not retry)
install_deps = not no_deps
if not failed:
label = INSTALL_LABEL if not PIPENV_HIDE_EMOJIS else ""
else:
Expand Down Expand Up @@ -721,7 +722,9 @@ def batch_install(deps_list, procs, failed_deps_queue,
is_artifact = True
elif dep.is_vcs:
is_artifact = True
needs_deps = not no_deps if no_deps is True else is_artifact
if not PIPENV_RESOLVE_VCS and is_artifact and not dep.editable:
install_deps = True
no_deps = False

extra_indexes = []
if not index and indexes:
Expand All @@ -734,17 +737,17 @@ def batch_install(deps_list, procs, failed_deps_queue,
os.environ["PIP_USER"] = vistir.compat.fs_str("0")
if "PYTHONHOME" in os.environ:
del os.environ["PYTHONHOME"]
if not needs_deps:
if not install_deps and not environments.PIPENV_RESOLVE_VCS:
link = getattr(dep.req, "link", None)
is_wheel = False
if link:
is_wheel = link.is_wheel
needs_deps = dep.is_file_or_url and not (is_wheel or dep.editable)
install_deps = dep.is_file_or_url and not (is_wheel or dep.editable)
c = pip_install(
dep,
ignore_hashes=any([ignore_hashes, dep.editable, dep.is_vcs]),
allow_global=allow_global,
no_deps=not needs_deps,
no_deps=not install_deps,
block=any([dep.editable, dep.is_vcs, blocking]),
index=index,
requirements_dir=requirements_dir,
Expand Down Expand Up @@ -803,7 +806,7 @@ def do_install_dependencies(
)
)
# Allow pip to resolve dependencies when in skip-lock mode.
no_deps = not skip_lock
no_deps = not skip_lock # skip_lock true, no_deps False, pip resolves deps
deps_list = list(lockfile.get_requirements(dev=dev, only=requirements))
if requirements:
index_args = prepare_pip_source_args(project.sources)
Expand Down Expand Up @@ -1395,7 +1398,7 @@ def pip_install(
if "PIP_SRC" in os.environ:
src_dir = os.environ["PIP_SRC"]
src = ["--src", os.environ["PIP_SRC"]]
if not requirement.editable:
if not requirement.editable and not environments.PIPENV_RESOLVE_VCS:
# Leave this off becauase old lockfiles don't have all deps included
# TODO: When can it be turned back on?
no_deps = False
Expand Down