From 306c0b92c3a098f391d3b2b064bb428c558a5ac8 Mon Sep 17 00:00:00 2001 From: Bastian Koppelmann Date: Mon, 16 Dec 2019 16:10:09 +0100 Subject: [PATCH] globals: Add tech module path to Pythonpath if it exists Signed-off-by: Bastian Koppelmann --- compiler/globals.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/compiler/globals.py b/compiler/globals.py index e9b77d66..8bca4b3f 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -504,6 +504,11 @@ def import_tech(): except ImportError: debug.error("Could not load tech module.", -1) + # Add custom modules of the technology to the path, if they exist + custom_mod_path = os.path.join(tech_path, "modules/") + if os.path.exists(custom_mod_path): + sys.path.append(custom_mod_path) + def print_time(name, now_time, last_time=None, indentation=2): """ Print a statement about the time delta. """