diff --git a/app/build_containers.py b/app/build_containers.py index 489af5d6..3e8bb140 100644 --- a/app/build_containers.py +++ b/app/build_containers.py @@ -45,9 +45,7 @@ def command(ctx, include, exclude): local_stack = ctx.obj.local_stack # See: https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure - from . import data container_build_dir = Path(__file__).absolute().parent.joinpath("data", "container-build") - print(f"dir is: {container_build_dir}") if local_stack: dev_root_path = os.getcwd()[0:os.getcwd().rindex("stack-orchestrator")] @@ -62,6 +60,7 @@ def command(ctx, include, exclude): print('Dev root directory doesn\'t exist, creating') # See: https://stackoverflow.com/a/20885799/1701505 + from . import data with importlib.resources.open_text(data, "container-image-list.txt") as container_list_file: containers = container_list_file.read().splitlines() diff --git a/app/deploy_system.py b/app/deploy_system.py index cb9c2efa..7195d593 100644 --- a/app/deploy_system.py +++ b/app/deploy_system.py @@ -40,9 +40,8 @@ def command(ctx, include, exclude, cluster, command, services): verbose = ctx.obj.verbose dry_run = ctx.obj.dry_run - # See: https://stackoverflow.com/a/20885799/1701505 - from . import data - compose_dir = importlib.resources.path(data, "compose") + # See: https://stackoverflow.com/questions/25389095/python-get-path-of-root-project-structure + compose_dir = Path(__file__).absolute().parent.joinpath("data", "compose") if cluster is None: # Create default unique, stable cluster name from confile file path @@ -53,6 +52,7 @@ def command(ctx, include, exclude, cluster, command, services): if verbose: print(f"Using cluster name: {cluster}") + # See: https://stackoverflow.com/a/20885799/1701505 from . import data with importlib.resources.open_text(data, "pod-list.txt") as pod_list_file: pods = pod_list_file.read().splitlines()