File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 5656import time
5757import traceback
5858from concurrent .futures import ThreadPoolExecutor
59+ from contextlib import contextmanager
5960from datetime import datetime
6061from string import ascii_letters
6162from textwrap import indent
@@ -2294,6 +2295,24 @@ def start_dir(self):
22942295 """Start directory in build directory"""
22952296 return self .cfg ['start_dir' ]
22962297
2298+ @contextmanager
2299+ def fake_module_environment (self ):
2300+ """
2301+ Load/Unload fake module
2302+ """
2303+ # load fake module
2304+ fake_mod_data = None
2305+ if not self .dry_run :
2306+ # load modules for build dependencies as extra modules
2307+ build_dep_mods = [dep ['short_mod_name' ] for dep in self .cfg .dependencies (build_only = True )]
2308+ fake_mod_data = self .load_fake_module (purge = True , extra_modules = build_dep_mods )
2309+
2310+ yield
2311+
2312+ # cleanup (unload fake module, remove fake module dir)
2313+ if fake_mod_data :
2314+ self .clean_up_fake_module (fake_mod_data )
2315+
22972316 def guess_start_dir (self ):
22982317 """
22992318 Return the directory where to start the whole configure/make/make install cycle from
You can’t perform that action at this time.
0 commit comments