skip dependencies marked as external modules when packaging#1550
skip dependencies marked as external modules when packaging#1550boegel merged 1 commit intoeasybuilders:developfrom
Conversation
|
original report by @DirkdeDraak: When an EasyConfig file has an EXTERNAL MODULE as a dependency, it fails to package. Here's a possible fix: |
|
@DirkdeDraak: thanks for reporting this I don't think your proposed suggestion is the best one long-term, however. With your approach, you'll end up with argument to My proposed change in this PR just skips dependencies that are marked as external modules, which seems more appropriate. Note that this does not affect the generated module which is included in the package, the |
There was a problem hiding this comment.
is get('external_module', default=False) also valid? I find this a bit unintuitive, but understand it now.
There was a problem hiding this comment.
No, see:
>> help({}.get)
Help on built-in function get:
get(...)
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.
>>> {}.get('external_module', False)
False
>>> {}.get('external_module', default=False)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: get() takes no keyword arguments
I'm using this instead of dep['external_module'] because the external_module key is not defined for the toolchain (yet). And it's safer, anyway.
There was a problem hiding this comment.
Yeah that's too bad. Anyway, it looks good. Thanks for fixing this.
I'll think about test cases at some point.
On Sat, Jan 16, 2016, 9:24 AM Kenneth Hoste [email protected]
wrote:
In easybuild/tools/package/utilities.py
#1550 (comment)
:@@ -106,9 +106,12 @@ def package_with_fpm(easyblock):
pprint.pformat([easyblock.toolchain.as_dict()] + easyblock.cfg.dependencies()))
depstring = ''
for dep in deps:
_log.debug("The dep added looks like %s ", dep)dep_pkgname = package_naming_scheme.name(dep)depstring += " --depends %s" % quote_str(dep_pkgname)if dep.get('external_module', False):No, see:
help({}.get)
Help on built-in function get:get(...)
D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.{}.get('external_module', False)
False
{}.get('external_module', default=False)
Traceback (most recent call last):
File "", line 1, in
TypeError: get() takes no keyword argumentsI'm using this instead of dep['external_module'] because the
external_module key is not defined for the toolchain (yet). And it's
safer, anyway.—
Reply to this email directly or view it on GitHub
https://github.com/hpcugent/easybuild-framework/pull/1550/files#r49932352
.
|
Looks good |
|
EasyBuild framework unit test suite FAILed. See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2509/console for more details. Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do. |
|
Jenkins: test this please |
|
EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2513/console for more details). This pull request is now ready for review/testing. Please try and find someone who can tackle this; contact @boegel if you're not sure what to do. |
|
Thanks for the review @rjeschmi! |
skip dependencies marked as external modules when packaging
fix for issue reported in easybuilders/easybuild#188
@rjeschmi: please review?