Improve Python package version check and add unversioned_packages EC param #2377
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes a format argument confusion in the check for a 0.0.0 version and enhances the error message.
As an escape hatch I added an EC param
unversioned_packages
which contains Python package names which should not trigger a failure on a 0.0.0 version as a last resort, e.g. as of recently in the opencarp package: easybuilders/easybuild-easyconfigs#12462As those checks can be annoying as they run after a potentially long installation I bundled all error messages together.
As it is impossible to detect the package name used by
pip list
automatically, theunversioned_packages
must be set even in ECs using other ECs which have such packages. I expect that to be very rare though.As an explanation: EC "python-protobuf` has a modulename of "google.protobuf" and a pip name of "protobuf". The Keras-* packages are likely similar. Reason is that the name used by pip is in the meta data of the package and could theoretically be anything, IIUC