Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Apr 1, 2021

Conversation

Flamefire
Copy link
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
Copy link
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...

easybuild/easyblocks/generic/pythonpackage.py Outdated Show resolved Hide resolved
Copy link
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