gyp: cherrypick python3 changes to input.py from node-gyp
Built on the lessons learned in #29130 if we bring all changes done to this file in node-gyp, that breaks our Travis CI tests so this PR cherrypicks only the Python 3 compatibility changes. These changes are somewhat complex because the complier module was removed in Python 3 in favor of ast which was introduced in Python 2.5.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines