diff --git a/webkit2gtk3-python3.patch b/webkit2gtk3-python3.patch index 518d19b..3ee7ed2 100644 --- a/webkit2gtk3-python3.patch +++ b/webkit2gtk3-python3.patch @@ -1917,3 +1917,27 @@ Index: webkitgtk-2.21.5/Source/WebInspectorUI/Scripts/copy-user-interface-resour # Copy over dynamically loaded files from other frameworks, even if we aren't combining resources. copy(File::Spec->catfile($ENV{'JAVASCRIPTCORE_PRIVATE_HEADERS_DIR'}, 'InspectorBackendCommands.js'), File::Spec->catfile($protocolDir, 'InspectorBackendCommands.js')) or die "Copy of InspectorBackendCommands.js failed: $!"; +diff -urp webkitgtk-2.22.2.orig/Source/JavaScriptCore/Scripts/generateIntlCanonicalizeLanguage.py webkitgtk-2.22.2/Source/JavaScriptCore/Scripts/generateIntlCanonicalizeLanguage.py +--- webkitgtk-2.22.2.orig/Source/JavaScriptCore/Scripts/generateIntlCanonicalizeLanguage.py 2018-09-21 14:59:46.000000000 -0500 ++++ webkitgtk-2.22.2/Source/JavaScriptCore/Scripts/generateIntlCanonicalizeLanguage.py 2018-10-11 09:19:50.540740664 -0500 +@@ -44,7 +44,10 @@ footer = """ + + def openOrExit(path, mode): + try: +- return open(path, mode) ++ if sys.version_info.major >= 3: ++ return open(path, mode, encoding="UTF-8") ++ else: ++ return open(path, mode) + except IOError as e: + print("I/O error opening {0}, ({1}): {2}".format(path, e.errno, e.strerror)) + exit(1) +@@ -189,7 +192,7 @@ if __name__ == "__main__": + intlCanonHPath = args[1] + + registryFile = openOrExit(registryPath, "r") +- intlCanonHFile = openOrExit(intlCanonHPath, "wb") ++ intlCanonHFile = openOrExit(intlCanonHPath, "w") + + intlCanonHFile.write(header) + diff --git a/webkit2gtk3.changes b/webkit2gtk3.changes index 8a6aea3..86bdf65 100644 --- a/webkit2gtk3.changes +++ b/webkit2gtk3.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Oct 11 14:20:21 UTC 2018 - mgorse@suse.com + +- Re-enable building with python 3 for SLE/Leap 15 and Tumbleweed +- Update webkit2gtk3-python3.patch. + ------------------------------------------------------------------- Thu Oct 4 21:04:10 UTC 2018 - mgorse@suse.com diff --git a/webkit2gtk3.spec b/webkit2gtk3.spec index d4a477e..66b8d77 100644 --- a/webkit2gtk3.spec +++ b/webkit2gtk3.spec @@ -36,7 +36,11 @@ %define _gold_linker 0 %endif %endif +%if 0%{?suse_version} >= 1500 +%bcond_without python3 +%else %bcond_with python3 +%endif Name: webkit2gtk3 Version: 2.22.2 Release: 0