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

make sure that GitPython version is a proper version before checking minimal required version #4091

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion easybuild/tools/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,8 @@ def check_github():
elif github_user:
if 'git' in sys.modules:
ver, req_ver = git.__version__, '1.0'
if LooseVersion(ver) < LooseVersion(req_ver):
version_regex = re.compile('^[0-9.]+$')
if version_regex.match(ver) and LooseVersion(ver) < LooseVersion(req_ver):
check_res = "FAIL (GitPython version %s is too old, should be version %s or newer)" % (ver, req_ver)
elif "Could not read from remote repository" in str(push_err):
check_res = "FAIL (GitHub SSH key missing? %s)" % push_err
Expand Down
3 changes: 1 addition & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ keyrings.alt

# GitPython 3.1.15 deprecates Python 3.5
GitPython==3.1.14; python_version >= '3.0' and python_version < '3.6'
# skip GitPython 3.1.28, since it prints 'git' as version which messes up the version check in check_github()
GitPython!=3.1.28; python_version >= '3.6' or python_version <= '3.0'
GitPython; python_version >= '3.6' or python_version <= '3.0'

# autopep8
# stick to older autopep8 with Python 2.7, since autopep8 1.7.0 requires pycodestyle>=2.9.1 (which is Python 3 only)
Expand Down