[GTK] Make Tools/gtkdoc python3 compatible
authortpopela@redhat.com <tpopela@redhat.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2019 07:11:39 +0000 (07:11 +0000)
committertpopela@redhat.com <tpopela@redhat.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Mar 2019 07:11:39 +0000 (07:11 +0000)
commit7d32241beb8c4c675acbef0a351d20dced68e4ed
tree489600178b2375bc4f00af8355fce2d0e9b258bd
parent3a1993d0519d450bf6e174d1f7e4a3bec1192e74
[GTK] Make Tools/gtkdoc python3 compatible
https://bugs.webkit.org/show_bug.cgi?id=195359

Reviewed by Carlos Garcia Campos.

* gtkdoc/generate-gtkdoc:
ConfigParser was reworked in Python 3.2 so we have adapt the code to
work with Python 2 and 3.
(get_gtkdoc_module_paths):
The iteritems() was removed in Python 3, so let's use items() that's
available in Python 2 and 3.
(get_generator_for_config):
* gtkdoc/gtkdoc.py:
(GTKDoc._run_command):
The sys.stdout.write() is expecting str in Python 3 and not bytes
(that are coming from stdout.encode()). Use sys.stdout.buffer.write()
for passing the bytes there.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@242637 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/gtkdoc/generate-gtkdoc
Tools/gtkdoc/gtkdoc.py