From 7725cdbe2cf8ca87dab08f75ed7f6ed91b5e8d3e Mon Sep 17 00:00:00 2001 From: Marcus Smith Date: Tue, 28 Apr 2015 16:00:38 -0700 Subject: [PATCH] - remove overlapping variables from populate_requirement_set - warn about not specifying requirements, when they're not specified, not when the RequirementSet happens to turn up empty --- pip/basecommand.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pip/basecommand.py b/pip/basecommand.py index f0455d0fa..c8c2be114 100644 --- a/pip/basecommand.py +++ b/pip/basecommand.py @@ -290,32 +290,34 @@ class RequirementCommand(Command): """ Marshal cmd line args into a requirement set. """ - for name in args: + for req in args: requirement_set.add_requirement( InstallRequirement.from_line( - name, None, isolated=options.isolated_mode, + req, None, isolated=options.isolated_mode, wheel_cache=wheel_cache ) ) - for name in options.editables: + for req in options.editables: requirement_set.add_requirement( InstallRequirement.from_editable( - name, + req, default_vcs=options.default_vcs, isolated=options.isolated_mode, wheel_cache=wheel_cache ) ) + found_req_in_file = False for filename in options.requirements: for req in parse_requirements( filename, finder=finder, options=options, session=session, wheel_cache=wheel_cache): + found_req_in_file = True requirement_set.add_requirement(req) - if not requirement_set.has_requirements: + if not (args or options.editables or found_req_in_file): opts = {'name': name} if options.find_links: msg = ('You must give at least one requirement to '