|
| 1 | +diff --git a/easybuild/framework/easyblock.py b/easybuild/framework/easyblock.py |
| 2 | +index a515bc4c8..c0b7e3553 100644 |
| 3 | +--- a/easybuild/framework/easyblock.py |
| 4 | ++++ b/easybuild/framework/easyblock.py |
| 5 | +@@ -2378,6 +2378,14 @@ class EasyBlock(object): |
| 6 | + raise EasyBuildError("EasyBuild-version %s is newer than the currently running one. Aborting!", |
| 7 | + easybuild_version) |
| 8 | + |
| 9 | ++ source_deps = self.cfg['source_deps'] |
| 10 | ++ pre_fetch_env = None |
| 11 | ++ # load modules for source dependencies (if any) |
| 12 | ++ if source_deps: |
| 13 | ++ pre_fetch_env = copy.deepcopy(os.environ) |
| 14 | ++ source_deps_mod_names = [d['short_mod_name'] for d in source_deps] |
| 15 | ++ self.modules_tool.load(source_deps_mod_names) |
| 16 | ++ |
| 17 | + start_progress_bar(PROGRESS_BAR_DOWNLOAD_ALL, self.cfg.count_files()) |
| 18 | + |
| 19 | + if self.dry_run: |
| 20 | +@@ -2464,6 +2472,9 @@ class EasyBlock(object): |
| 21 | + |
| 22 | + stop_progress_bar(PROGRESS_BAR_DOWNLOAD_ALL) |
| 23 | + |
| 24 | ++ if pre_fetch_env: |
| 25 | ++ restore_env(pre_fetch_env) |
| 26 | ++ |
| 27 | + def checksum_step(self): |
| 28 | + """Verify checksum of sources and patches, if a checksum is available.""" |
| 29 | + for fil in self.src + self.patches: |
| 30 | +diff --git a/easybuild/framework/easyconfig/default.py b/easybuild/framework/easyconfig/default.py |
| 31 | +index 7c1b5acab..5ce8cdaca 100644 |
| 32 | +--- a/easybuild/framework/easyconfig/default.py |
| 33 | ++++ b/easybuild/framework/easyconfig/default.py |
| 34 | +@@ -170,6 +170,7 @@ DEFAULT_CONFIG = { |
| 35 | + 'multi_deps_load_default': [True, "Load module for first version listed in multi_deps by default", DEPENDENCIES], |
| 36 | + 'osdependencies': [[], "OS dependencies that should be present on the system", DEPENDENCIES], |
| 37 | + 'moddependpaths': [None, "Absolute path(s) to prepend to MODULEPATH before loading dependencies", DEPENDENCIES], |
| 38 | ++ 'source_deps': [[], "source dependencies that should be present befory getting the sources", DEPENDENCIES], |
| 39 | + |
| 40 | + # LICENSE easyconfig parameters |
| 41 | + 'accept_eula': [False, "Accepted End User License Agreement (EULA) for this software", LICENSE], |
| 42 | +diff --git a/easybuild/framework/easyconfig/easyconfig.py b/easybuild/framework/easyconfig/easyconfig.py |
| 43 | +index 57c910c74..04db92add 100644 |
| 44 | +--- a/easybuild/framework/easyconfig/easyconfig.py |
| 45 | ++++ b/easybuild/framework/easyconfig/easyconfig.py |
| 46 | +@@ -766,6 +766,14 @@ class EasyConfig(object): |
| 47 | + builddeps = [self._parse_dependency(dep, build_only=True) for dep in builddeps] |
| 48 | + self['builddependencies'] = remove_false_versions(builddeps) |
| 49 | + |
| 50 | ++ sourcedeps = self['source_deps'] |
| 51 | ++ if sourcedeps and all(isinstance(x, (list, tuple)) for b in sourcedeps for x in b): |
| 52 | ++ self.iterate_options.append('source_deps') |
| 53 | ++ sourcedeps = [[self._parse_dependency(dep, build_only=True) for dep in x] for x in sourcedeps] |
| 54 | ++ else: |
| 55 | ++ sourcedeps = [self._parse_dependency(dep, build_only=True) for dep in sourcedeps] |
| 56 | ++ self['source_deps'] = remove_false_versions(sourcedeps) |
| 57 | ++ |
| 58 | + # keep track of parsed multi deps, they'll come in handy during sanity check & module steps... |
| 59 | + self.multi_deps = self.get_parsed_multi_deps() |
| 60 | + |
0 commit comments