From b9db2f99821a56c1c4801c217ee92bcc9ea47ebb Mon Sep 17 00:00:00 2001 From: Paul Scheffler Date: Mon, 25 Sep 2023 17:31:40 +0200 Subject: [PATCH] occamygen: Access `clustergen` in non-hardcoded way (2) --- util/occamygen/occamy.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/occamygen/occamy.py b/util/occamygen/occamy.py index 380c1933f..e11de3f29 100644 --- a/util/occamygen/occamy.py +++ b/util/occamygen/occamy.py @@ -7,7 +7,8 @@ from pathlib import Path # If `SNITCH_ROOT` is set, use it. otherwise, assume workspace location -snitch_root = Path(os.environ['SNITCH_ROOT'] if 'SNITCH_ROOT' in os.environ else "../../deps/snitch_cluster").resolve() +snitch_root = Path(os.environ['SNITCH_ROOT'] if 'SNITCH_ROOT' in os.environ else + Path(__file__).parent / "../../deps/snitch_cluster").resolve() sys.path.append(f'{snitch_root}/util/clustergen') from cluster import Generator, PMA, PMACfg, SnitchCluster, clog2 # noqa: E402