diff --git a/src/kupferbootstrap/binfmt/cli.py b/src/kupferbootstrap/binfmt/cli.py index 1e3f050..fd33bbe 100644 --- a/src/kupferbootstrap/binfmt/cli.py +++ b/src/kupferbootstrap/binfmt/cli.py @@ -15,7 +15,7 @@ arches_arg_optional = click.argument('arches', type=click.Choice(ARCHES), nargs= @cmd_binfmt.command('register', help='Register a binfmt handler with the kernel') @arches_arg def cmd_register(arches: list[Arch], disable_chroot: bool = False): - from packages.build import build_enable_qemu_binfmt + from ..packages.build import build_enable_qemu_binfmt for arch in arches: build_enable_qemu_binfmt(arch) diff --git a/src/kupferbootstrap/chroot/cli.py b/src/kupferbootstrap/chroot/cli.py index 61058f3..187cc06 100644 --- a/src/kupferbootstrap/chroot/cli.py +++ b/src/kupferbootstrap/chroot/cli.py @@ -30,7 +30,7 @@ def cmd_chroot(ctx: click.Context, type: str = 'build', name: Optional[str] = No raise Exception(f'Unknown chroot type: "{type}"') if type == 'rootfs': - from image.image import cmd_inspect + from ..image.image import cmd_inspect assert isinstance(cmd_inspect, click.Command) ctx.invoke(cmd_inspect, profile=name, shell=True) return diff --git a/src/kupferbootstrap/config/cli.py b/src/kupferbootstrap/config/cli.py index 7e6714f..0204ad3 100644 --- a/src/kupferbootstrap/config/cli.py +++ b/src/kupferbootstrap/config/cli.py @@ -205,7 +205,7 @@ def prompt_for_save(retry_ctx: Optional[click.Context] = None): If `retry_ctx` is passed, the context's command will be reexecuted with the same arguments if the user chooses to retry. False will still be returned as the retry is expected to either save, perform another retry or arbort. """ - from wrapper import is_wrapped + from ..wrapper import is_wrapped if click.confirm(f'Do you want to save your changes to {config.runtime.config_file}?', default=True): if is_wrapped(): logging.warning("Writing to config file inside wrapper." diff --git a/src/kupferbootstrap/distro/repo_config.py b/src/kupferbootstrap/distro/repo_config.py index ffcd70f..90ff908 100644 --- a/src/kupferbootstrap/distro/repo_config.py +++ b/src/kupferbootstrap/distro/repo_config.py @@ -8,10 +8,10 @@ import yaml from copy import deepcopy from typing import ClassVar, Optional, Mapping, Union -from kupferbootstrap.config.state import config -from kupferbootstrap.constants import Arch, BASE_DISTROS, KUPFER_HTTPS, REPOS_CONFIG_FILE, REPOSITORIES -from kupferbootstrap.dictscheme import DictScheme, toml_inline_dicts, TomlPreserveInlineDictEncoder -from kupferbootstrap.utils import sha256sum +from ..config.state import config +from ..constants import Arch, BASE_DISTROS, KUPFER_HTTPS, REPOS_CONFIG_FILE, REPOSITORIES +from ..dictscheme import DictScheme, toml_inline_dicts, TomlPreserveInlineDictEncoder +from ..utils import sha256sum REPOS_KEY = 'repos' REMOTEURL_KEY = 'remote_url' @@ -142,7 +142,7 @@ def get_repo_config( config_exists = os.path.exists(repo_config_file_path) if not config_exists and _current_config is None: if initialize_pkgbuilds: - from packages.pkgbuild import init_pkgbuilds + from ..packages.pkgbuild import init_pkgbuilds init_pkgbuilds(update=False) return get_repo_config(initialize_pkgbuilds=False, repo_config_file=repo_config_file) if repo_config_file is not None: diff --git a/src/kupferbootstrap/py.typed b/src/kupferbootstrap/py.typed new file mode 100644 index 0000000..e69de29