Fix MFC redist DLLs not found: prefere corresponding version but accept different version #2248
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 patch fix the error "MFC redist DLLs not found" building pywin32 on system where the redist version is not the same of the vc tools, which is a normal situation ad not an anomaly.
Previous implementation "ensure corresponding version" if the vc tools version is known, else it accept everything.
This implementation "prefere corresponding version" (if the version is known) but accept different version if the corresponding one is not found and allow to build pywin32 in a lot of situation.
I think that this test for the redist version can be improved a lot, for example taking the latest version with the same major from the vc tools version, but at this stage I made the change as little as possible and as compatible as possible: Where previous version builds normally nothing will change and only where it refused to build the change will take effect and solves the problem.