Fix missing initialization of CMakeMake in CMakePythonPackage#2876
Conversation
| def __init__(self, *args, **kwargs): | ||
| """Initialize with PythonPackage.""" | ||
| PythonPackage.__init__(self, *args, **kwargs) | ||
| self._lib_ext = None # From CMakeMake.__init__ |
There was a problem hiding this comment.
Removing this makes sense to me, but maybe we should try and hunt down why we have it like this.
There may be a reason it's like this...
I'd say we definitely need to try and test this modified easyblock extensively (ideally with all easyconfigs we have that use CMakePythonPackage, directly or indirectly, although I can't come up with a reason why this would break something, from the top of my head...
There was a problem hiding this comment.
git blame shows that this code is very old. The addition with _lib_ext was done by me when I ran into this earlier and didn't wanted to touch anything else.
So I believe it was rather missing experience (e.g. not knowing about super()) especially with multi-inheritance than intentional.
I did test with GenomeWorks-2021.02.2-fosscuda-2020b.eb (where I encountered it) and also verified that now both __init__ functions are called. Might make sense to test some more but I guess for "plain" ECs using this block there won't be any issues if that one worked so rather other easyblocks deriving from this may be affected although I'd consider that a bug in those as I'm very sure this is correct (now).
|
Test report by @boegel Overview of tested easyconfigs (in order)
Build succeeded for 8 out of 8 (8 easyconfigs in total) |
|
Tests tell me it should be OK to merge, so merging... Thanks @Flamefire! |
(created using
eb --new-pr)The
CMakeMakeeasyblock does some initialization in its__init__method which get skipped byCMakePythonPackageas that only initializes thePythonPackageclass.That is wrong as changes to the CMakeMake easyblock will be missed if not manually added as done before with
self._lib_ext = None.I observed an actual failure caused by this when testing #2838 which adds another member variable in its init and then e.g.
GenomeWorks-2021.02.2-fosscuda-2020b.ebfails withThis fixes it by simply removing the custom (incomplete)
__init__function. Now the build succeeds.