* [build][CMake] Use `find_package(Git)` to confirm existence before trying to use git for version stamp; Use friendlier detection of grep executable on Windows; Use "del" on Windows instead of "rm".
* [build][Windows] Include dirent and msinttypes headers in source tree.
* Remove grep dependency for lua exports generation
* Sneaky pythons hiding in code.
* [build] Change `git_id` macro to skip check if no git directory is present, also now fails gracefully; Fix `today` macro on Windows; Report git revision; Make sure QtSvg module is found.
Instead of manually opening and closes file objects, use the context
manager that will properly handle opening and closing files for us, even
in the event of some error
Almost entirely fixing print statements, but also a couple importing
changes, wrapped in try/excepts, and one case where dict.keys() not
being a list would be a problem.
Also reverts e41139a397
The real fix for #1907