From 64b7911e9db7fd7221455d73e70c92db84821835 Mon Sep 17 00:00:00 2001 From: Antoine Pouille Date: Mon, 25 Mar 2024 18:37:22 +0100 Subject: [PATCH] Kappy: add alternate dune bin dir --- kappy/kappa_std.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/kappy/kappa_std.py b/kappy/kappa_std.py index a6db3e438..c69651d22 100644 --- a/kappy/kappa_std.py +++ b/kappy/kappa_std.py @@ -17,10 +17,13 @@ from .kappa_graph import KappaSnapshot def find_agent_bin(): - dune_build_dir = '_build/install/default' + potential_dirs = [] + for base_dir in [KAPPY_DIR, KASIM_DIR]: + for dune_build_dir in ['', '_build/install/default', '_build/default']: + potential_dirs.append(os.path.join(base_dir, dune_build_dir)) agent_names = ['KappaSwitchman'] bin_dir = None - for potential_dir in [KAPPY_DIR, KASIM_DIR, os.path.join(KAPPY_DIR, dune_build_dir), os.path.join(KASIM_DIR, dune_build_dir)]: + for potential_dir in potential_dirs: bin_dir = os.path.join(potential_dir, 'bin') if not os.path.exists(bin_dir): continue