mhammond / pywin32

Python for Windows (pywin32) Extensions
4.9k stars 783 forks source link

Fix MFC redist DLLs not found: prefere corresponding version but accept different version #2248

Closed andreabravetti closed 1 month ago

andreabravetti commented 2 months ago

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.

andreabravetti commented 2 months ago

This fix issie #2244