From 8e39835e4ab845ca523a15f9066edf098089ea84 Mon Sep 17 00:00:00 2001 From: iLLiCiTiT Date: Fri, 4 Dec 2020 14:42:31 +0100 Subject: [PATCH] add full path to acre module --- igniter/tools.py | 7 ++++++- pype.py | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/igniter/tools.py b/igniter/tools.py index 6cbda996fc..ea130b29d7 100644 --- a/igniter/tools.py +++ b/igniter/tools.py @@ -97,7 +97,12 @@ def load_environments(sections: list = None) -> dict: try: import acre except ImportError: - sys.path.append("repos/acre") + acre_dir = os.path.join( + os.path.dirname(os.path.dirname(os.path.abspath(__file__))), + "repos", + "acre" + ) + sys.path.append(acre_dir) import acre from pype import settings diff --git a/pype.py b/pype.py index 954249b2b2..c0b91303ae 100644 --- a/pype.py +++ b/pype.py @@ -49,7 +49,12 @@ from igniter.tools import load_environments try: import acre except ImportError: - sys.path.append("repos/acre") + acre_dir = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + "repos", + "acre" + ) + sys.path.append(acre_dir) import acre from igniter import BootstrapRepos