Fix #9299 (Makefile: tools/matchcompiler.py is executed via Python 2)#2247
Merged
versat merged 1 commit intoOct 8, 2019
Merged
Conversation
Check if "python" is available, if not check for "python3" and use the available Python interpreter. If no Python interpreter is found, "make" fails with an according error message. This solves the issue that not all modern Linux distributions any longer install Python 2 by default, so "python" is not available and "make MATCHCOMPILER=yes" would fail. Instead of forcing the users to install Python 2, Python 3 is used in such a case now if it is available.
Collaborator
Author
|
Tested under Debian 10 with only Python 3 ("python3") beeing available and under Cygwin with Python 2 and Python 3 installed. |
Collaborator
|
lgtm. I think it's fine to drop support for python 2 in internal scripts. but well if you can still allow python 2 for a while that is better.. |
danmar
approved these changes
Oct 8, 2019
jubnzv
pushed a commit
to jubnzv/cppcheck
that referenced
this pull request
Nov 13, 2019
…cppcheck-opensource#2247) Check if "python" is available, if not check for "python3" and use the available Python interpreter. If no Python interpreter is found, "make" fails with an according error message. This solves the issue that not all modern Linux distributions any longer install Python 2 by default, so "python" is not available and "make MATCHCOMPILER=yes" would fail. Instead of forcing the users to install Python 2, Python 3 is used in such a case now if it is available.
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.
Check if "python" is available, if not check for "python3" and use
the available Python interpreter. If no Python interpreter is found,
"make" fails with an according error message.
This solves the issue that not all modern Linux distributions any longer
install Python 2 by default, so "python" is not available and
"make MATCHCOMPILER=yes" would fail. Instead of forcing the users to
install Python 2, Python 3 is used in such a case now if it is
available.