This attempts to fix the genmarshal.py test and mkenums.py test on Windows. From the commit message:
The two test scripts actually assumed some *NIX paradigms, so we need to adapt them so that they can work on Windows as well, the changes arenamely:
Call the glib-mkenums and glib-genmarshal Python scripts with the Python interpreter, not just relying on shebang lines, on Windows. This is because the native Windows console (cmd.exe) does not support shebang lines.
Use NamedTemporaryFile with delete=False, otherwise Windows cannot find the temp files we need when running the tests.
We are using stdout, so we need to account for line ending differences, i.e. '\r\n' vs '\n'.
Make sure we are not in the temp directories we create, where the tests are being run, upon cleanup. Windows does not like deleting directories that we are currently in.
Somehow when running 'meson test glib/gobject : mkenums.py' the test still fails, but I can't see any exceptions from the meson-logs/testlog.txt. 'meson test glib/gobject : genmarshal.py' does pass.The tests now pass on Windows.
This also fixes gobject/tests/mkenums.py's _write_rspfile() as the return statement for this method is at the wrong level.
With blessings, thank you!