[docs]def__init__(self,*args,**kwargs):ifarpyisNone:raiseCLEError("run `pip install arpy==1.1.1` to load archive files")super().__init__(*args,**kwargs)# hack: we are using a loader internal method in a non-kosher way which will cause our children to be# marked as the main binary if we are also the main binary# work around this by setting ourself here:ifself.loader._main_objectisNone:self.loader._main_object=selfar=arpy.Archive(fileobj=self._binary_stream)ar.read_all_headers()forname,streaminar.archived_files.items():child=self.loader._load_object_isolated(stream)child.binary=child.binary_basename=name.decode()child.parent_object=selfself.child_objects.append(child)ifself.child_objects:self._arch=self.child_objects[0].archelse:log.warning("Loaded empty static archive?")self.has_memory=Falseself.pic=True# hack pt. 2ifself.loader._main_objectisself:self.loader._main_object=None