2023-09-27 15:45:31 -07:00
|
|
|
import os
|
|
|
|
import capnp
|
2025-06-13 15:59:36 +09:00
|
|
|
from importlib.resources import as_file, files
|
2023-09-27 15:45:31 -07:00
|
|
|
|
|
|
|
capnp.remove_import_hook()
|
|
|
|
|
2025-06-13 15:59:36 +09:00
|
|
|
with as_file(files("cereal")) as fspath:
|
|
|
|
CEREAL_PATH = fspath.as_posix()
|
|
|
|
log = capnp.load(os.path.join(CEREAL_PATH, "log.capnp"))
|
|
|
|
car = capnp.load(os.path.join(CEREAL_PATH, "car.capnp"))
|
|
|
|
custom = capnp.load(os.path.join(CEREAL_PATH, "custom.capnp"))
|