[Webkit-unassigned] [Bug 195359] New: [GTK] Make Tools/gtk/generate-gtkdoc python3 compatible

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Mar 6 06:39:17 PST 2019


https://bugs.webkit.org/show_bug.cgi?id=195359

            Bug ID: 195359
           Summary: [GTK] Make Tools/gtk/generate-gtkdoc python3
                    compatible
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKitGTK
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: tpopela at redhat.com
                CC: bugs-noreply at webkitgtk.org

In bug 106195 the Tools/gtk/generate-gtkdoc was made Python 3 compatible. But using Python 3.7.2 I can't make the 2.23.91 tarball to build with -DPYTHON_EXECUTABLE=%{_bindir}/python3 passed to cmake.

It fails with:

FAILED: docs-build.stamp
cd /home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/x86_64-redhat-linux-gnu && /usr/bin/cmake -E env CC=/usr/lib64/ccache/cc "CFLAGS=-fdiagnostics-color=always -Wextra -Wall -Wno-expansion-to-defined -Wno-maybe-uninitialized -Wwrite-strings -Wundef -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wcast-align -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DUSER_AGENT_GTK_DISTRIBUTOR_NAME='\"Fedora\"' -fno-strict-aliasing -fno-exceptions -Wno-unused-parameter" /home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc --gtk && touch docs-build.stamp
Traceback (most recent call last):
  File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 19, in <module>
    from ConfigParser import SafeConfigParser
ModuleNotFoundError: No module named 'ConfigParser'

because the ConfigParser module was reworked in Python 3.2 (see https://github.com/jaraco/configparser/#configparser). We need to make the import Python 2 and 3 compatible.

Also there is another error when the import is fixed:

Traceback (most recent call last):
  File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 252, in <module>
    build_gtkdoc_for_wkgtk(arguments)
  File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 201, in build_gtkdoc_for_wkgtk
    jsc_generator = get_generator_for_config(common.build_path('gtkdoc-jsc-glib.cfg'), arguments.virtual_root)
  File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 136, in get_generator_for_config
    'cross_reference_deps': get_gtkdoc_module_paths(cross_reference_deps),
  File "/home/tpopela/dev/fedora/webkit2gtk3/webkitgtk-2.23.91/Tools/gtkdoc/generate-gtkdoc", line 60, in get_gtkdoc_module_paths
    for package, modules in dependent_packages.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'

We should user items() instead of iteritems().

Patch follows.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190306/7e492c88/attachment.html>


More information about the webkit-unassigned mailing list