File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 2222import heapq
2323import threading
2424import importlib
25- import json
2625import builtins
2726import re
2827import os
2928
29+ # Ensure the package root (the 'devsimpy' directory) is on sys.path so imports
30+ # such as 'PluginManager' or 'DEVSKernel.*' are resolvable when running from the repo root.
31+ _pkg_dir = os .path .dirname (__file__ )
32+ _pkg_root = os .path .dirname (_pkg_dir )
33+ if _pkg_root not in sys .path :
34+ # insert at front to prefer local package over any installed packages
35+ sys .path .insert (0 , _pkg_root )
36+
3037from PluginManager import PluginManager #trigger_event
3138from Utilities import getOutDir
3239from Patterns .Strategy import SimStrategy
4148 import importlib
4249 exec ("%s = importlib.import_module('DEVSKernel%s.DEVS')" % (pydevs_dir ,d ))
4350
51+
4452## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ##
4553#
4654# GLOBAL VARIABLES AND FUNCTIONS
You can’t perform that action at this time.
0 commit comments