Regenerate `pywin32_swig.patch` without Python 2 concerns
- Replaced
MODINIT_ERROR_RETURNmacro usages withNULL - Fixed patch (trailing spaces are necessary otherwise git considers it "corrupted")
- Reapplied the patch to swig1.1p5
- Removed Python 2 codepaths (including the
MODINIT_ERROR_RETURNmacro) and minimal fix to makefiles for modern MSVC - Regenerated the patch file using git bas/MINGW64's
difftool. - Mention
--ignore-space-changeto avoind git thinking "this patch doesn't apply" due to line ending differences
Will reduce changes in https://github.com/mhammond/pywin32/pull/2686
This seems fine, but I guess we are going to want a new executable too? ie, I'm not sure it makes sense to land this if it means the exe and this patch are inconsistent?
right, I see #2686 also wants to modify this. I guess this seems fine if it helps keep that ball rolling (although I wonder how far that ball will actually roll!)
We can have a new executable yeah, I see your point. Even though it should work the same.
If you don't wanna bother building a new one now, I could split up this PR into just fixing the patch and tool configs so git stops rejecting it.
Btw I noticed my patch generation had quite a different style, idk if it's because whoever wrote the original patch maybe did it with a different tool than git diff
I suspect that patch predates git? But if you can verify locally the patch applies and makes a new executable which works I'm happy to have this merged
Alright, I'll try to build SWIG locally and ensure that it still results in a valid pywin32 build. I'm off to bed for tonight though.
(although I wonder how far that ball will actually roll!)
Me too. There's definitely some good changes from clin's attempt (like the new stable ABI functions for objects type and refcount). So I'll help take it piecemeal.
I've had to fix include paths. I quickly did so by replacing INCLUDE with INCFLAGS and remove all STD_INC from make files.
But it did build a new swig.exe which I then used to successfully build pywin32.
I can even confirm that pywin32 fails to build if I build swig without the patch (because of Python 2 code).
Do you want me to include the minimal makefile changes as well ?
Should I include the new swig executable in this PR or did you simply want me to make sure the patch was truly still valid ?
Do you want me to include the minimal makefile changes as well ?
Should I include the new swig executable in this PR or did you simply want me to make sure the patch was truly still valid ?
I think you should include both if you don't mind. I'm not currently in a position to be able to regenerate the executables and you've been here long enough that I trust you to do that :) Thanks!