Merge pull request #2184 from KLayout/bugfix/issue-2169

Fixed issue #2169: adding path to 'python' and 'ruby' subfolders to i…
This commit is contained in:
Matthias Köfferlein 2025-10-19 19:44:50 +02:00 committed by GitHub
commit b885cf64e7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions

View File

@ -31,6 +31,7 @@
#include "lymMacroInterpreter.h" #include "lymMacroInterpreter.h"
#include "lymMacro.h" #include "lymMacro.h"
#include "gsiDecl.h" #include "gsiDecl.h"
#include "tlFileUtils.h"
#include <QDir> #include <QDir>
#include <QUrl> #include <QUrl>
@ -354,6 +355,8 @@ MacroController::sync_package_paths ()
{ {
std::vector<std::string> package_locations; std::vector<std::string> package_locations;
// Add package locations for packages
lay::SaltController *sc = lay::SaltController::instance (); lay::SaltController *sc = lay::SaltController::instance ();
if (sc) { if (sc) {
lay::Salt &salt = sc->salt (); 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 // 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. // TODO: maybe that is a performance bottleneck, but right now, remove_package_location doesn't do a lot.