from importlib.abc import MetaPathFinder
from importlib.machinery import ModuleSpec, BuiltinImporter
import sys

class EmbeddedCythonModuleFinder(MetaPathFinder):
    def find_spec(self, fullname, path, target=None):
            if fullname in sys.builtin_module_names:
                return ModuleSpec(fullname, BuiltinImporter)

sys.meta_path.append(EmbeddedCythonModuleFinder())