Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for filtering dependencies by using False as version #3506

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions easybuild/framework/easyconfig/easyconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -702,10 +702,13 @@ def parse(self):
# parse dependency specifications
# it's important that templating is still disabled at this stage!
self.log.info("Parsing dependency specifications...")
self['dependencies'] = [self._parse_dependency(dep) for dep in self['dependencies']]
self['hiddendependencies'] = [
self._parse_dependency(dep, hidden=True) for dep in self['hiddendependencies']
]

def remove_false_versions(deps):
return [dep for dep in deps if not (isinstance(dep, dict) and dep['version'] is False)]

self['dependencies'] = remove_false_versions(self._parse_dependency(dep) for dep in self['dependencies'])
self['hiddendependencies'] = remove_false_versions(self._parse_dependency(dep, hidden=True) for dep in
self['hiddendependencies'])

# need to take into account that builddependencies may need to be iterated over,
# i.e. when the value is a list of lists of tuples
Expand All @@ -715,7 +718,7 @@ def parse(self):
builddeps = [[self._parse_dependency(dep, build_only=True) for dep in x] for x in builddeps]
else:
builddeps = [self._parse_dependency(dep, build_only=True) for dep in builddeps]
self['builddependencies'] = builddeps
self['builddependencies'] = remove_false_versions(builddeps)

# keep track of parsed multi deps, they'll come in handy during sanity check & module steps...
self.multi_deps = self.get_parsed_multi_deps()
Expand Down