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
finish custom module naming scheme support #879
finish custom module naming scheme support #879
Conversation
@boegel merge fails? |
@@ -238,6 +238,39 @@ def retrieve_blocks_in_spec(spec, only_blocks, silent=False): | |||
return [spec] | |||
|
|||
|
|||
def det_full_module_name(ec, eb_ns=False, build_options=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tools.py
is not the garbage bin for all utility functions. at least easybuild.tools.module_naming_scheme
is a better namespace since it's related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is framework/easyconfig/tools.py
, not filetools.py
...
moving it to module_naming_scheme
is not an option, as this det_full_module_name
requires process_easyconfig
...
it's clear to me that the old |
…yconfig parameters when determining full module name
…ies under custom module naming that requires all easyconfig parameters
@stdweird: are you saying I should look into implementing a |
@boegel yes, some wrapper around a 2 element tuple should do it. |
This reverts commit a90039f.
@@ -775,7 +776,7 @@ def make_module_dep(self): | |||
|
|||
# Load dependencies | |||
builddeps = self.cfg.builddependencies() | |||
for dep in self.toolchain.dependencies: | |||
for (dep, mod_name) in self.toolchain.dependencies: | |||
if not dep in builddeps: | |||
dep_mod_name = det_full_module_name(dep) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stupid code is stupid: we're getting the module name via mod_name
, and we then re-determine the module name with another call to det_full_module_name
... >_<
…ndency, reorganise modules in easyconfig package to make that possible
@stdweird: remark fixed as discussed, which required some moving around of stuff in Please rereview? |
""" | ||
# convert tuple to string otherwise python might complain about the formatting | ||
self.log.debug("Parsing %s as a dependency" % str(dep)) | ||
|
||
attr = ['name', 'version', 'versionsuffix', 'toolchain'] | ||
dependency = { | ||
'dummy': False, | ||
'name': '', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a comment what the difference is between name and mod_name
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
@boegel looks much better. should have followed your advise and stayed away from tweak.py ;) |
Merging in this beast, thanks for the review @stdweird! |
…e_support finish custom module naming scheme support
this fixes #687, and is a big step towards fixing #862