def build(self, source_entities, targets):
        src_file = source_entities[0].get()

        empty_re = re.compile(r'^\s*\r*\n', re.MULTILINE)
        slash_re = re.compile(r'\\\r*\n', re.MULTILINE)
        comments_re = re.compile(r"^\s*#.*$", re.MULTILINE)
        all_stmt_re = re.compile(
            r"^__all__\s*=\s*\(.+?\)", re.MULTILINE | re.DOTALL)

        content = aql.read_text_file(src_file)

        content = slash_re.sub("", content)
        content = comments_re.sub("", content)
        content = all_stmt_re.sub("", content)

        # -----------------------------------------------------------

        import_re = re.compile(r"^import\s+(.+)$", re.MULTILINE)

        std_imports = set()

        def import_handler(match, _std_imports=std_imports):
            module_name = match.group(1)
            _std_imports.add(module_name)
            return ""

        content = import_re.sub(import_handler, content)

        # -----------------------------------------------------------

        aql_import_re = re.compile(r"^\s*from\s+(\.?aql.+)\s+import\s+.+$",
                                   re.MULTILINE)

        aql_imports = set()

        def aql_import_handler(match, _aql_imports=aql_imports):
            module_name = match.group(1)

            if module_name.startswith('.'):
                module_name = os.sep + module_name[1:] + '.py'
            else:
                module_name = os.sep + \
                    module_name.replace('.', os.sep) + os.sep

            _aql_imports.add(module_name)
            return ""

        content = aql_import_re.sub(aql_import_handler, content)

        # -----------------------------------------------------------

        content = empty_re.sub("", content)

        target = aql.SimpleEntity(name=src_file,
                                  data=(std_imports, aql_imports, content))

        targets.add_target_entity(target)