Install Python 3 tools before installing Python 2 tools. #339
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.
This change is designed to reduce the fallout of issues with Python 2 dependency installation, since Python 2 is both less popular than Python 3 and also end-of-life meaning there are more likely to be issues with it as tools like Pip drop support for it.
Firstly it moves all the Python 2 steps to the end. This ensures that if they fail the script will have already done the Python 3 dependency installation, which is the one we likely care most about. It also wraps the Python 2 dependency installation in a check that Python 2 is actually present to avoid spurious warnings when you're only using Python 3 which is going to become more and more common.
I note that [there is a PowerShell version of this script, which I have not updated. This is because the PowerShell version already totally ignores all exit codes, so is already fairly safe when it comes to the Python 2 steps failing (although ignoring all exit codes obviously has its own problems).
Merge / deployment checklist