enhance test and install step of CMakePythonPackage easyblock#2318
enhance test and install step of CMakePythonPackage easyblock#2318lexming wants to merge 6 commits intoeasybuilders:developfrom
Conversation
|
An example of the failure of
|
|
Successful test with |
|
Test report by @lexming Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
|
Test report by @lexming Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
|
An example of the This option defines the directory containing the source of the Python package to be installed with The path can be an absolute path or a path relative to |
| return PythonPackage.make_module_extra(self) | ||
| def post_install_step(self): | ||
| """Reset working directory before post-installation commands""" | ||
| change_dir(os.path.join(self.builddir, 'easybuild_obj')) |
There was a problem hiding this comment.
This is not correct if build_in_installdir is True for the CMake part, or if separate_builddir is False.
There was a problem hiding this comment.
@lexming friendly reminder, any updates on this?
Currently,
CMakePythonPackagefails with any easyconfig that does not explicitly setruntestbecause it executes the test step inCMakeMakewith the defaults ofPythonPackaging, resulting in amake Truetest command.This PR fixes this issue by adding specific options for
runtestinCMakeMakeand inPythonPackage.Moreover,
installoptssuffers from a similar problem in this easyblock. This option is unusable because it is handled byPythonPackage, which might add a bunch of options forpipifusepip = True, whereas the install step is executed bymake.This PR fixes this issue by adding a specific
installoptsformakeand it also adds the option to execute the install step fromPythonPackage(iepip install) aftermake install. This is useful for packages that do not install the python module withmake install.I also made a little bit of cleanup of the code, using inheritance through
super()where possible.Existing easyconfigs using
CMakePythonPackageare not affected by this PR, see tests below. The low number of easyconfigs using this easyblock might be a result of these issues.