Skip to content

Commit

Permalink
comments on 'unnamed' requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
qwcode committed Nov 14, 2012
1 parent dc5e825 commit d882827
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pip/req.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def from_line(cls, name, comes_from=None):
# Otherwise, assume the name is the req for the non URL/path/archive case.
if link and req is None:
url = link.url_without_fragment
req = link.egg_fragment
req = link.egg_fragment #when fragment is None, this will become an 'unnamed' requirement

# Handle relative file URLs
if link.scheme == 'file' and re.search(r'\.\./', url):
Expand Down Expand Up @@ -843,6 +843,7 @@ def add_requirement(self, install_req):
install_req.as_egg = self.as_egg
install_req.use_user_site = self.use_user_site
if not name:
#url or path requirement w/o an egg fragment
self.unnamed_requirements.append(install_req)
else:
if self.has_requirement(name):
Expand Down Expand Up @@ -1095,6 +1096,7 @@ def prepare_files(self, finder, force_root_egg_info=False, bundle=False):
reqs.append(subreq)
self.add_requirement(subreq)
if not self.has_requirement(req_to_install.name):
#'unnamed' requirements will get added here
self.add_requirement(req_to_install)
if self.is_download or req_to_install._temp_build_dir is not None:
self.reqs_to_cleanup.append(req_to_install)
Expand Down

0 comments on commit d882827

Please sign in to comment.