add support for running 'pip check' during sanity check in generic PythonPackage easyblock#1853
Merged
wpoely86 merged 5 commits intoeasybuilders:developfrom Nov 21, 2019
Merged
Conversation
houndci-bot
reviewed
Nov 15, 2019
wpoely86
requested changes
Nov 15, 2019
Flamefire
reviewed
Nov 16, 2019
| return pylibdir | ||
|
|
||
|
|
||
| def det_pip_version(): |
Contributor
There was a problem hiding this comment.
I'd refactor this to only do the required work:
def det_pip_version():
"""Determine version of currently active 'pip' command."""
out, _ = run_cmd("pip --version", verbose=False, simple=False, trace=False)
pip_version_regex = re.compile('^pip ([0-9.]+)')
res = pip_version_regex.search(out)
if res:
return res.group(1)
else:
log = fancylogger.getLogger('det_pylibdir', fname=False)
log.warning("Failed to determine pip version from '%s' using pattern '%s'", out, pip_version_regex.pattern)
return None
Member
Author
There was a problem hiding this comment.
I'll enhance the function a bit to use more logging instead...
wpoely86
reviewed
Nov 17, 2019
| pip_version = det_pip_version() | ||
| if pip_version: | ||
| if LooseVersion(pip_version) >= LooseVersion('9.0.0'): | ||
| run_cmd("pip check") |
Member
There was a problem hiding this comment.
this is non - fatal if it fails?
Member
Author
There was a problem hiding this comment.
It's fatal, run_cmd will raise an error for commands that exit with a non-zero exit code by default.
wpoely86
approved these changes
Nov 21, 2019
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.
cc @Flamefire