Improve Python package version check and add unversioned_packages EC param#2377
Merged
boegel merged 3 commits intoeasybuilders:developfrom Apr 1, 2021
Merged
Improve Python package version check and add unversioned_packages EC param#2377boegel merged 3 commits intoeasybuilders:developfrom
boegel merged 3 commits intoeasybuilders:developfrom
Conversation
aa8d403 to
6192b2f
Compare
6192b2f to
9eaadd0
Compare
boegel
requested changes
Apr 1, 2021
boegel
approved these changes
Apr 1, 2021
Member
boegel
left a comment
There was a problem hiding this comment.
lgtm
Tested with both an easyconfig file that now fails due to a 0.0.0 version being installed (carputils-20200915-foss-2020a-Python-3.8.2.eb), and verifying that unversioned_packages works as expected, and with PythonPackage easyconfigs that are not affected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_packageswhich 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 listautomatically, theunversioned_packagesmust 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