Note that this does not introduce an extra build dependency in any of the three
build systems:
1. Autotools: these steps are done during construction of the portable source
tarball, during which Python 3 is already required (see autogen.sh).
2. CMake: Python 3 is already required by and used in the top level
CMakeLists.txt.
3. MS Build: Python 3 is already used in version generation in
lib/version/version.vcxproj.
This change is motivated by the goal of removing a dependency on Awk. Though it
also conveniently side steps some line ending portability issues that were being
worked around with `AWK_OPTIONS`. In Python, this is unnecessary because reading
a file in text mode accounts for both flavors of line endings.