summaryrefslogtreecommitdiffstats
path: root/recipes-qt/qt5/qtwebengine/0001-Allow-to-build-with-python3.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-qt/qt5/qtwebengine/0001-Allow-to-build-with-python3.patch')
-rw-r--r--recipes-qt/qt5/qtwebengine/0001-Allow-to-build-with-python3.patch102
1 files changed, 102 insertions, 0 deletions
diff --git a/recipes-qt/qt5/qtwebengine/0001-Allow-to-build-with-python3.patch b/recipes-qt/qt5/qtwebengine/0001-Allow-to-build-with-python3.patch
new file mode 100644
index 00000000..fbdacdcf
--- /dev/null
+++ b/recipes-qt/qt5/qtwebengine/0001-Allow-to-build-with-python3.patch
@@ -0,0 +1,102 @@
1From 717fbe35574a2409f1be28cdb3b1504133560b90 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 23 Jan 2020 17:48:46 +0100
4Subject: [PATCH] Allow to build with python3
5
6Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
7---
8 mkspecs/features/functions.prf | 6 +-----
9 src/buildtools/config/support.pri | 5 -----
10 src/buildtools/configure.json | 14 --------------
11 tools/scripts/gn_find_mocables.py | 4 ++--
12 4 files changed, 3 insertions(+), 26 deletions(-)
13
14diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf
15index 512e2523..38bf76cd 100644
16--- a/mkspecs/features/functions.prf
17+++ b/mkspecs/features/functions.prf
18@@ -39,11 +39,7 @@ defineReplace(which) {
19
20 # Returns the unquoted path to the python executable.
21 defineReplace(pythonPath) {
22- isEmpty(QMAKE_PYTHON2) {
23- # Fallback for building QtWebEngine with Qt < 5.8
24- QMAKE_PYTHON2 = python
25- }
26- return($$QMAKE_PYTHON2)
27+ return("python3")
28 }
29
30 # Returns the python executable for use with shell / make targets.
31diff --git a/src/buildtools/config/support.pri b/src/buildtools/config/support.pri
32index 5bdd808d..a942d3dc 100644
33--- a/src/buildtools/config/support.pri
34+++ b/src/buildtools/config/support.pri
35@@ -61,11 +61,6 @@ defineReplace(qtwebengine_checkError) {
36 return(false)
37 }
38
39- !qtConfig(webengine-python2) {
40- qtwebengine_skipBuild("Python version 2 (2.7.5 or later) is required to build QtWebEngine.")
41- return(false)
42- }
43-
44 linux:!qtwebengine_checkErrorForLinux():return(false)
45 win:!qtwebengine_checkErrorForWindows():return(false)
46
47diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json
48index a36d0532..24387fe7 100644
49--- a/src/buildtools/configure.json
50+++ b/src/buildtools/configure.json
51@@ -318,11 +318,6 @@
52 "label": "system ninja",
53 "type": "detectNinja"
54 },
55- "webengine-python2": {
56- "label": "python2",
57- "type": "detectPython2",
58- "log": "location"
59- },
60 "webengine-winversion": {
61 "label": "winversion",
62 "type": "compile",
63@@ -374,7 +369,6 @@
64 "webengine-core-support": {
65 "label": "Support Qt WebEngine Core",
66 "condition": "module.gui
67- && features.webengine-python2
68 && features.webengine-gperf
69 && features.webengine-bison
70 && features.webengine-flex
71@@ -404,14 +398,6 @@
72 "autoDetect": "features.private_tests",
73 "output": [ "privateFeature" ]
74 },
75- "webengine-python2": {
76- "label": "python2",
77- "condition": "tests.webengine-python2",
78- "output": [
79- "privateFeature",
80- { "type": "varAssign", "name": "QMAKE_PYTHON2", "value": "tests.webengine-python2.location" }
81- ]
82- },
83 "webengine-gperf": {
84 "label": "gperf",
85 "condition": "tests.webengine-gperf",
86diff --git a/tools/scripts/gn_find_mocables.py b/tools/scripts/gn_find_mocables.py
87index d1f68245..4dc2576e 100644
88--- a/tools/scripts/gn_find_mocables.py
89+++ b/tools/scripts/gn_find_mocables.py
90@@ -58,10 +58,10 @@ for f in filter(os.path.isfile, files):
91 includedMocs.add(im.group(1))
92
93 for mocable in includedMocs:
94- print "Found included moc: " + mocable
95+ print("Found included moc: " + mocable)
96
97 assert len(includedMocs) == 0 , "Included mocs are not supported !"
98
99 for mocable in mocables:
100- print mocable
101+ print(mocable)
102 sys.exit(0)