diff --git a/src/runboat/k8s.py b/src/runboat/k8s.py index afead27..1b3f7ee 100644 --- a/src/runboat/k8s.py +++ b/src/runboat/k8s.py @@ -183,7 +183,9 @@ def _get_kubefiles_path(kubefiles_path: Path | None) -> Generator[Path, None, No if kubefiles_path: yield kubefiles_path else: - with resources.path(__package__, "kubefiles") as default_kubefiles_path: + with resources.as_file( + resources.files(__package__).joinpath("kubefiles") + ) as default_kubefiles_path: yield default_kubefiles_path diff --git a/src/runboat/webui.py b/src/runboat/webui.py index 80dcd54..7b9ca74 100644 --- a/src/runboat/webui.py +++ b/src/runboat/webui.py @@ -40,7 +40,9 @@ def mount(app: FastAPI) -> None: directory, which is then mounted under the /webui route. """ webui_path = Path(__file__).parent / "webui" - with resources.path("runboat", "webui-templates") as webui_template_path: + with resources.as_file( + resources.files(__package__).joinpath("webui-templates") + ) as webui_template_path: for path in webui_template_path.iterdir(): if path.name.endswith(".jinja"): template = jinja2.Template(path.read_text())