def _directory_import(self):
<EOL>path = os.path.abspath(self.path)<EOL>ws = pkg_resources.WorkingSet([])<EOL>ws.add_entry(path)<EOL>dist = ws.by_key.get(DIST_NAME)<EOL>if dist is None:<EOL><INDENT>setup_py = os.path.join(path, '<STR_LIT>')<EOL>if os.path.isfile(setup_py):<EOL><INDENT>sp.check_output([sys.executable, '<STR_LIT>', '<STR_LIT>'], cwd=path)<EOL>for dist in pkg_resources.find_distributions(path, True):<EOL><INDENT>return dist<EOL><DEDENT><DEDENT><DEDENT>return dist<EOL>
Import astropy_helpers from the given path, which will be added to
sys.path.

Must return True if the import succeeded, and False otherwise.