From 84c76096cbd0dc34f2c56953e969bbe976185480 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 18 Oct 2025 15:01:44 +0200 Subject: [PATCH] Fixed issue #2169: adding path to 'python' and 'ruby' subfolders to interpreter search path also for technologies, not only for packages. --- src/lay/lay/layMacroController.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/lay/lay/layMacroController.cc b/src/lay/lay/layMacroController.cc index 026eceb0f..05a21bfbe 100644 --- a/src/lay/lay/layMacroController.cc +++ b/src/lay/lay/layMacroController.cc @@ -31,6 +31,7 @@ #include "lymMacroInterpreter.h" #include "lymMacro.h" #include "gsiDecl.h" +#include "tlFileUtils.h" #include #include @@ -354,6 +355,8 @@ MacroController::sync_package_paths () { std::vector package_locations; + // Add package locations for packages + lay::SaltController *sc = lay::SaltController::instance (); if (sc) { lay::Salt &salt = sc->salt (); @@ -362,6 +365,15 @@ MacroController::sync_package_paths () } } + // Add package locations for technologies which share the same structure + + for (db::Technologies::const_iterator t = db::Technologies::instance ()->begin (); t != db::Technologies::instance ()->end (); ++t) { + std::string bd = t->base_path (); + if (! bd.empty () && tl::is_dir (bd)) { + package_locations.push_back (bd); + } + } + // refresh the package locations by first removing the package locations and then rebuilding // TODO: maybe that is a performance bottleneck, but right now, remove_package_location doesn't do a lot.