def get_local_directory_dist(self):
if not os.path.isdir(self.path):<EOL><INDENT>return<EOL><DEDENT>log.info('<STR_LIT>'.format(<EOL>'<STR_LIT>' if self.is_submodule else '<STR_LIT>',<EOL>self.path))<EOL>dist = self._directory_import()<EOL>if dist is None:<EOL><INDENT>log.warn(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>'.format(self.path, PACKAGE_NAME))<EOL><DEDENT>elif self.auto_upgrade and not self.is_submodule:<EOL><INDENT>upgrade = self._do_upgrade(dist)<EOL>if upgrade is not None:<EOL><INDENT>dist = upgrade<EOL><DEDENT><DEDENT>return dist<EOL>
Handle importing a vendored package from a subdirectory of the source
distribution.