From 49e3b504fc279589ef4e6559b020ec49bc8c8848 Mon Sep 17 00:00:00 2001 From: ldericher <40151420+ldericher@users.noreply.github.com> Date: Tue, 28 Sep 2021 19:43:12 +0200 Subject: [PATCH] bandaid fix for KIWI_ROOT --- kiwi_scp/_constants.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/kiwi_scp/_constants.py b/kiwi_scp/_constants.py index be0ab6d..cd12c09 100644 --- a/kiwi_scp/_constants.py +++ b/kiwi_scp/_constants.py @@ -4,8 +4,8 @@ import os ############# # ENVIRONMENT -# location of "src" directory to use -KIWI_ROOT = os.getenv('KIWI_ROOT', ".") +# location of "kiwi_scp" module +KIWI_ROOT = os.path.dirname(__file__) # default name of kiwi-scp file KIWI_CONF_NAME = os.getenv('KIWI_CONF_NAME', "kiwi.yml") @@ -13,17 +13,17 @@ KIWI_CONF_NAME = os.getenv('KIWI_CONF_NAME', "kiwi.yml") # FILE NAMES # text files inside kiwi-scp "src" directory -HEADER_KIWI_CONF_NAME = f"{KIWI_ROOT}/etc/kiwi_header.yml" -DEFAULT_KIWI_CONF_NAME = f"{KIWI_ROOT}/etc/kiwi_default.yml" -VERSION_TAG_NAME = f"{KIWI_ROOT}/etc/version_tag" -DEFAULT_DOCKER_COMPOSE_NAME = f"{KIWI_ROOT}/etc/docker-compose_default.yml" -KIWI_HELP_TEXT_NAME = f"{KIWI_ROOT}/etc/kiwi_help.txt" -COMMAND_HELP_TEXT_NAME = f"{KIWI_ROOT}/etc/command_help.txt" +HEADER_KIWI_CONF_NAME = f"{KIWI_ROOT}/data/etc/kiwi_header.yml" +DEFAULT_KIWI_CONF_NAME = f"{KIWI_ROOT}/data/etc/kiwi_default.yml" +VERSION_TAG_NAME = f"{KIWI_ROOT}/data/etc/version_tag" +DEFAULT_DOCKER_COMPOSE_NAME = f"{KIWI_ROOT}/data/etc/docker-compose_default.yml" +KIWI_HELP_TEXT_NAME = f"{KIWI_ROOT}/data/etc/kiwi_help.txt" +COMMAND_HELP_TEXT_NAME = f"{KIWI_ROOT}/data/etc/command_help.txt" # special config directory in projects CONF_DIRECTORY_NAME = 'conf' # location for auxiliary Dockerfiles -IMAGES_DIRECTORY_NAME = f"{KIWI_ROOT}/images" +IMAGES_DIRECTORY_NAME = f"{KIWI_ROOT}/data/images" #################### # DOCKER IMAGE NAMES