Use Python 3 stable ABI to build MacVim, and better Python discovery #1428
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.
Vim added support for using Python 3 stable ABI in 9.0.1776, which allows us to safely load Python libraries of a different version from what Vim was built against. Modify our CI to use that. This allows user to use whatever Python version they want as long as it's above the minimum target. Given that macOS/Xcode still ships with 3.9 by default, we build using 3.9 as the minimum version.
Also, change our Python detection script to work better. Change all explicit versions in our paths to refer to the "Current" version instead which for the most part should "just work" instead of requiring an exact match every time we or Python update to a new version (e.g. Homebrew will update the Current version to point to the latest Python3). Also add support for finding Python 3 from Xcode Command Line Tools which was previously not ok to use technically because it's 3.9 and before stable ABI support we couldn't load it safely as MacVim was built using newer versions.
Fix #1351.