Skip to content

Improve Python package version check and add unversioned_packages EC param#2377

Merged
boegel merged 3 commits intoeasybuilders:developfrom
Flamefire:faultyVersionCheck
Apr 1, 2021
Merged

Improve Python package version check and add unversioned_packages EC param#2377
boegel merged 3 commits intoeasybuilders:developfrom
Flamefire:faultyVersionCheck

Conversation

@Flamefire
Copy link
Copy Markdown
Contributor

@Flamefire Flamefire commented Apr 1, 2021

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#12462

As 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, the unversioned_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

@Flamefire Flamefire force-pushed the faultyVersionCheck branch 3 times, most recently from aa8d403 to 6192b2f Compare April 1, 2021 08:21
@Flamefire Flamefire force-pushed the faultyVersionCheck branch from 6192b2f to 9eaadd0 Compare April 1, 2021 10:35
@boegel boegel added the bug fix label Apr 1, 2021
@boegel boegel added this to the next release (4.3.4?) milestone Apr 1, 2021
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tiny typo to fix...

Comment thread easybuild/easyblocks/generic/pythonpackage.py Outdated
Copy link
Copy Markdown
Member

@boegel boegel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@boegel boegel merged commit 043967b into easybuilders:develop Apr 1, 2021
@Flamefire Flamefire deleted the faultyVersionCheck branch April 1, 2021 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants