Anonymous committed 7606f4c

Raise an InstallationError while using --no-download if it looks like a source folder is missing.

  • Participants
  • Parent commits aa8072f

Comments (0)

Files changed (1)

             elif install_needed:
                 req_to_install.source_dir = req_to_install.build_location(self.build_dir, not self.is_download)
+            if req_to_install.source_dir is not None and not os.path.isdir(req_to_install.source_dir):
+                raise InstallationError('Could not install requirement %s '
+                                       'because source folder %s does not exist '
+                                       '(perhaps --no-download was used without first running '
+                                       'an equivalent install with --no-install?)'
+                                       % (req_to_install, req_to_install.source_dir))
     def install_files(self, finder, force_root_egg_info=False, bundle=False):
         unnamed = list(self.unnamed_requirements)
         reqs = self.requirements.values()