File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change 26
26
del _lzma
27
27
28
28
import fnmatch
29
+ import importlib .util
29
30
import json
30
31
import logging
31
32
import os
45
46
46
47
47
48
# Import penv_setup functionality
48
- try :
49
- from .builder .penv_setup import setup_penv_minimal , get_executable_path
50
- except ImportError :
51
- # Fallback for standalone execution
52
- sys .path .insert (0 , str (Path (__file__ ).parent / "builder" ))
53
- from penv_setup import setup_penv_minimal , get_executable_path
49
+ # Import penv_setup functionality using explicit module loading
50
+ penv_setup_path = Path (__file__ ).parent / "builder" / "penv_setup.py"
51
+ spec = importlib .util .spec_from_file_location ("penv_setup" , str (penv_setup_path ))
52
+ penv_setup_module = importlib .util .module_from_spec (spec )
53
+ spec .loader .exec_module (penv_setup_module )
54
+
55
+ setup_penv_minimal = penv_setup_module .setup_penv_minimal
56
+ get_executable_path = penv_setup_module .get_executable_path
54
57
55
58
56
59
# Constants
You can’t perform that action at this time.
0 commit comments