aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/doxygen/doxygen/doxygen-native-only-check-python3.patch
blob: a9650c232f714adbe79581752137aed2334688f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
It fails to compile doxygen-native when /usr/bin/python is a link to python3 on
build host:

| Failed to import the site module
| Traceback (most recent call last):
|   File "/usr/lib64/python3.6/site.py", line 564, in <module>
|     main()
|   File "/usr/lib64/python3.6/site.py", line 550, in main
|     known_paths = addusersitepackages(known_paths)
|   File "/usr/lib64/python3.6/site.py", line 282, in addusersitepackages
|     user_site = getusersitepackages()
|   File "/usr/lib64/python3.6/site.py", line 258, in getusersitepackages
|     user_base = getuserbase() # this will also set USER_BASE
|   File "/usr/lib64/python3.6/site.py", line 248, in getuserbase
|     USER_BASE = get_config_var('userbase')
|   File "/usr/lib64/python3.6/sysconfig.py", line 604, in get_config_var
|     return get_config_vars().get(name)
|   File "/usr/lib64/python3.6/sysconfig.py", line 553, in get_config_vars
|     _init_posix(_CONFIG_VARS)
|   File "/usr/lib64/python3.6/sysconfig.py", line 424, in _init_posix
|     _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
| ModuleNotFoundError: No module named '_sysconfigdata'

Replace find_package PythonInterp with Python3 to fix this issue that
it uses python3 from python3-native. And it also replaces the result
variable PYTHON_EXECUTABLE with Python3_EXECUTABLE.

This patch is only needded by doxygen-native.

Upstream-Status: Inappropriate[oe specific]

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 969ae58..604400f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,7 +93,7 @@ else ()
 endif ()
 
 find_program(DOT NAMES dot)
-find_package(PythonInterp REQUIRED)
+find_package(Python3 REQUIRED)
 find_package(FLEX REQUIRED)
 find_package(BISON REQUIRED)
 if (BISON_VERSION VERSION_LESS 2.7)
diff --git a/addon/doxywizard/CMakeLists.txt b/addon/doxywizard/CMakeLists.txt
index 6aacd8b..fa197e9 100644
--- a/addon/doxywizard/CMakeLists.txt
+++ b/addon/doxywizard/CMakeLists.txt
@@ -58,7 +58,7 @@ set_source_files_properties(${GENERATED_SRC_WIZARD}/settings.h PROPERTIES GENERA
 
 # generate version.cpp
 add_custom_command(
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/version.py ${VERSION} > ${GENERATED_SRC_WIZARD}/version.cpp
+    COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/version.py ${VERSION} > ${GENERATED_SRC_WIZARD}/version.cpp
     DEPENDS ${CMAKE_SOURCE_DIR}/VERSION ${CMAKE_SOURCE_DIR}/src/version.py
     OUTPUT ${GENERATED_SRC_WIZARD}/version.cpp
 )
@@ -66,7 +66,7 @@ set_source_files_properties(${GENERATED_SRC_WIZARD}/version.cpp PROPERTIES GENER
 
 # generate configdoc.cpp
 add_custom_command(
-COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -wiz ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC_WIZARD}/configdoc.cpp
+COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -wiz ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC_WIZARD}/configdoc.cpp
 OUTPUT ${GENERATED_SRC_WIZARD}/configdoc.cpp
 )
 set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GENERATED 1)
@@ -74,7 +74,7 @@ set_source_files_properties(${GENERATED_SRC_WIZARD}/configdoc.cpp PROPERTIES GEN
 set(LEX_FILES config_doxyw) 
 foreach(lex_file ${LEX_FILES})
     add_custom_command(
-	    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/addon/doxywizard/${lex_file}.l > ${GENERATED_SRC_WIZARD}/${lex_file}.l.h
+	    COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/addon/doxywizard/${lex_file}.l > ${GENERATED_SRC_WIZARD}/${lex_file}.l.h
         DEPENDS ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/addon/doxywizard/${lex_file}.l
 	OUTPUT  ${GENERATED_SRC_WIZARD}/${lex_file}.l.h
     )
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 032c16a..332f1b2 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -132,7 +132,7 @@ configure_file(${CMAKE_SOURCE_DIR}/doc/doxyindexer.1      ${PROJECT_BINARY_DIR}/
 
 # doc/language.doc (see tag Doxyfile:INPUT)
 add_custom_command(
-        COMMAND ${PYTHON_EXECUTABLE} translator.py ${CMAKE_SOURCE_DIR}
+        COMMAND ${Python3_EXECUTABLE} translator.py ${CMAKE_SOURCE_DIR}
         DEPENDS ${PROJECT_BINARY_DIR}/doc/maintainers.txt ${PROJECT_BINARY_DIR}/doc/language.tpl ${PROJECT_BINARY_DIR}/doc/translator.py
         OUTPUT language.doc
         WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc
@@ -141,7 +141,7 @@ set_source_files_properties(language.doc PROPERTIES GENERATED 1)
 
 # doc/config.doc (see tag Doxyfile:INPUT)
 add_custom_command(
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/src/configgen.py -doc ${TOP}/src/config.xml > config.doc
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/src/configgen.py -doc ${TOP}/src/config.xml > config.doc
         DEPENDS ${TOP}/src/config.xml ${TOP}/src/configgen.py
         OUTPUT config.doc
         WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/doc/
@@ -192,7 +192,7 @@ add_custom_target(docs_chm
     COMMAND ${CMAKE_COMMAND} -E echo "    for file in files:" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py
     COMMAND ${CMAKE_COMMAND} -E echo "        if file.endswith('.html') or file.endswith('.png') or file.endswith('.css') or file.endswith('.gif'):" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py
     COMMAND ${CMAKE_COMMAND} -E echo "            print(os.path.join(root, file))" >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py
-    COMMAND ${CMAKE_COMMAND} -E chdir  ${PROJECT_BINARY_DIR}/chm ${PYTHON_EXECUTABLE} ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual.hhp
+    COMMAND ${CMAKE_COMMAND} -E chdir  ${PROJECT_BINARY_DIR}/chm ${Python3_EXECUTABLE} ${PROJECT_BINARY_DIR}/chm/doxygen_manual_examples_chm.py >> ${PROJECT_BINARY_DIR}/chm/doxygen_manual.hhp
     COMMAND ${CMAKE_COMMAND} -E chdir ${PROJECT_BINARY_DIR}/chm "${HTML_HELP_COMPILER}" doxygen_manual.hhp || echo > nul
     COMMAND ${CMAKE_COMMAND} -E rename ${PROJECT_BINARY_DIR}/chm/index.chm ${PROJECT_BINARY_DIR}/chm/doxygen_manual.chm
         DEPENDS ${PROJECT_BINARY_DIR}/doc/language.doc ${PROJECT_BINARY_DIR}/doc/config.doc
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 967f3d4..a8d1aad 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -52,196 +52,196 @@ add_custom_target(examples
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen class.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/class/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/class/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/class/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/class/latex/refman_doc.tex
 	DEPENDS doxygen class.h class.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/class/html/index.html ${PROJECT_BINARY_DIR}/html/examples/class/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen define.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/define/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/define/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/define/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/define/latex/refman_doc.tex
 	DEPENDS doxygen define.h define.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/define/html/index.html ${PROJECT_BINARY_DIR}/html/examples/define/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen enum.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/enum/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/enum/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/enum/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/enum/latex/refman_doc.tex
 	DEPENDS doxygen enum.h enum.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/enum/html/index.html ${PROJECT_BINARY_DIR}/html/examples/enum/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen file.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/file/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/file/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/file/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/file/latex/refman_doc.tex
 	DEPENDS doxygen file.h file.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/file/html/index.html ${PROJECT_BINARY_DIR}/html/examples/file/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen func.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/func/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/func/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/func/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/func/latex/refman_doc.tex
 	DEPENDS doxygen func.h func.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/func/html/index.html ${PROJECT_BINARY_DIR}/html/examples/func/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen javadoc-banner.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/latex/refman_doc.tex
 	DEPENDS doxygen javadoc-banner.h javadoc-banner.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/html/index.html ${PROJECT_BINARY_DIR}/html/examples/javadoc-banner/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen page.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/page/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/page/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/page/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/page/latex/refman_doc.tex
 	DEPENDS doxygen page.doc page.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/page/html/index.html ${PROJECT_BINARY_DIR}/html/examples/page/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen relates.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/relates/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/relates/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/relates/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/relates/latex/refman_doc.tex
 	DEPENDS doxygen relates.cpp relates.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/relates/html/index.html ${PROJECT_BINARY_DIR}/html/examples/relates/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen author.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/author/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/author/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/author/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/author/latex/refman_doc.tex
 	DEPENDS doxygen author.cpp author.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/author/html/index.html ${PROJECT_BINARY_DIR}/html/examples/author/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen par.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/par/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/par/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/par/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/par/latex/refman_doc.tex
 	DEPENDS doxygen par.cpp par.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/par/html/index.html ${PROJECT_BINARY_DIR}/html/examples/par/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen overload.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/overload/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/overload/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/overload/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/overload/latex/refman_doc.tex
 	DEPENDS doxygen overload.cpp overload.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/overload/html/index.html ${PROJECT_BINARY_DIR}/html/examples/overload/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen example.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/example/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/example/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/example/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/example/latex/refman_doc.tex
 	DEPENDS doxygen example.cpp example_test.cpp example.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/example/html/index.html ${PROJECT_BINARY_DIR}/html/examples/example/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen include.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/include/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/include/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/include/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/include/latex/refman_doc.tex
 	DEPENDS doxygen include.cpp include_test.cpp include.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/include/html/index.html ${PROJECT_BINARY_DIR}/html/examples/include/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen qtstyle.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/qtstyle/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/qtstyle/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/qtstyle/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/qtstyle/latex/refman_doc.tex
 	DEPENDS doxygen qtstyle.cpp qtstyle.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/qtstyle/html/index.html ${PROJECT_BINARY_DIR}/html/examples/qtstyle/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen jdstyle.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/jdstyle/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/jdstyle/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/jdstyle/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/jdstyle/latex/refman_doc.tex
 	DEPENDS doxygen jdstyle.cpp jdstyle.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/jdstyle/html/index.html ${PROJECT_BINARY_DIR}/html/examples/jdstyle/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen structcmd.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/structcmd/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/structcmd/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/structcmd/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/structcmd/latex/refman_doc.tex
 	DEPENDS doxygen structcmd.h structcmd.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/structcmd/html/index.html ${PROJECT_BINARY_DIR}/html/examples/structcmd/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen autolink.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/autolink/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/autolink/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/autolink/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/autolink/latex/refman_doc.tex
 	DEPENDS doxygen autolink.cpp autolink.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/autolink/html/index.html ${PROJECT_BINARY_DIR}/html/examples/autolink/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen tag.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/tag/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/tag/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/tag/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/tag/latex/refman_doc.tex
 	DEPENDS doxygen tag.cpp tag.cfg ${PROJECT_BINARY_DIR}/html/examples/example/html/index.html ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/tag/html/index.html ${PROJECT_BINARY_DIR}/html/examples/tag/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen restypedef.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/restypedef/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/restypedef/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/restypedef/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/restypedef/latex/refman_doc.tex
 	DEPENDS doxygen restypedef.cpp restypedef.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/restypedef/html/index.html ${PROJECT_BINARY_DIR}/html/examples/restypedef/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen afterdoc.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/afterdoc/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/afterdoc/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/afterdoc/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/afterdoc/latex/refman_doc.tex
 	DEPENDS doxygen afterdoc.h afterdoc.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/afterdoc/html/index.html ${PROJECT_BINARY_DIR}/html/examples/afterdoc/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen templ.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/template/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/template/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/template/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/template/latex/refman_doc.tex
 	DEPENDS doxygen templ.cpp templ.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/template/html/index.html ${PROJECT_BINARY_DIR}/html/examples/template/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen group.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/group/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/group/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/group/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/group/latex/refman_doc.tex
 	DEPENDS doxygen group.cpp group.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/group/html/index.html ${PROJECT_BINARY_DIR}/html/examples/group/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen memgrp.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/memgrp/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/memgrp/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/memgrp/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/memgrp/latex/refman_doc.tex
 	DEPENDS doxygen memgrp.cpp memgrp.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/memgrp/html/index.html ${PROJECT_BINARY_DIR}/html/examples/memgrp/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen pyexample.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/pyexample/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/pyexample/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/pyexample/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/pyexample/latex/refman_doc.tex
 	DEPENDS doxygen pyexample.py pyexample.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/pyexample/html/index.html ${PROJECT_BINARY_DIR}/html/examples/pyexample/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen tclexample.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/tclexample/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/tclexample/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/tclexample/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/tclexample/latex/refman_doc.tex
 	DEPENDS doxygen tclexample.tcl tclexample.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/tclexample/html/index.html ${PROJECT_BINARY_DIR}/html/examples/tclexample/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen mux.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/mux/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/mux/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/mux/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/mux/latex/refman_doc.tex
 	DEPENDS doxygen mux.vhdl mux.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/mux/html/index.html ${PROJECT_BINARY_DIR}/html/examples/mux/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen manual.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/manual/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/manual/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/manual/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/manual/latex/refman_doc.tex
 	DEPENDS doxygen manual.c manual.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/manual/html/index.html ${PROJECT_BINARY_DIR}/html/examples/manual/latex/refman_doc.tex
 )
 
 add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen docstring.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/docstring/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/docstring/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/docstring/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/docstring/latex/refman_doc.tex
 	DEPENDS doxygen docstring.py docstring.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/docstring/html/index.html ${PROJECT_BINARY_DIR}/html/examples/docstring/latex/refman_doc.tex
 )
@@ -249,7 +249,7 @@ add_custom_command(
 if (DOT)
   add_custom_command(
 	COMMAND ${EXECUTABLE_OUTPUT_PATH}/doxygen diagrams.cfg
-        COMMAND ${PYTHON_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/diagrams/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/diagrams/latex/refman_doc.tex
+        COMMAND ${Python3_EXECUTABLE}  ${TOP}/examples/strip_example.py  < ${PROJECT_BINARY_DIR}/html/examples/diagrams/latex/refman.tex > ${PROJECT_BINARY_DIR}/html/examples/diagrams/latex/refman_doc.tex
 	DEPENDS doxygen diagrams_a.h diagrams_b.h diagrams_c.h diagrams_d.h diagrams_e.h diagrams.cfg ${TOP}/examples/strip_example.py
 	OUTPUT ${PROJECT_BINARY_DIR}/html/examples/diagrams/html/index.html ${PROJECT_BINARY_DIR}/html/examples/diagrams/latex/refman_doc.tex
   )
diff --git a/libmscgen/CMakeLists.txt b/libmscgen/CMakeLists.txt
index 079fcfc..e6d86f6 100644
--- a/libmscgen/CMakeLists.txt
+++ b/libmscgen/CMakeLists.txt
@@ -7,7 +7,7 @@ include_directories(
 set(LEX_FILES mscgen_lexer) 
 foreach(lex_file ${LEX_FILES})
     add_custom_command(
-        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/libmscgen/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h
+        COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/libmscgen/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h
         DEPENDS ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/libmscgen/${lex_file}.l
         OUTPUT  ${GENERATED_SRC}/${lex_file}.l.h
     )
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 23460d0..58f679a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -35,7 +35,7 @@ set_source_files_properties(${GENERATED_SRC}/settings.h PROPERTIES GENERATED 1)
 
 # configvalues.h
 add_custom_command(
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h
+    COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maph ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.h
     DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py
     OUTPUT ${GENERATED_SRC}/configvalues.h
 )
@@ -47,7 +47,7 @@ add_custom_target(
 
 # configvalues.cpp
 add_custom_command(
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maps ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.cpp
+    COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -maps ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configvalues.cpp
     DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py
     OUTPUT ${GENERATED_SRC}/configvalues.cpp
 )
@@ -55,7 +55,7 @@ set_source_files_properties(${GENERATED_SRC}/configvalues.cpp PROPERTIES GENERAT
 
 # configoptions.cpp
 add_custom_command(
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -cpp ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configoptions.cpp
+    COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/configgen.py -cpp ${CMAKE_SOURCE_DIR}/src/config.xml > ${GENERATED_SRC}/configoptions.cpp
     DEPENDS ${CMAKE_SOURCE_DIR}/src/config.xml ${CMAKE_SOURCE_DIR}/src/configgen.py
     OUTPUT ${GENERATED_SRC}/configoptions.cpp
 )
@@ -86,7 +86,7 @@ file(GLOB RESOURCES ${CMAKE_SOURCE_DIR}/templates/*/*)
 # resources.cpp
 add_custom_command(
     COMMENT  "Generating ${GENERATED_SRC}/resources.cpp"
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/res2cc_cmd.py ${CMAKE_SOURCE_DIR}/templates ${GENERATED_SRC}/resources.cpp
+    COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/res2cc_cmd.py ${CMAKE_SOURCE_DIR}/templates ${GENERATED_SRC}/resources.cpp
     DEPENDS ${RESOURCES}
     OUTPUT ${GENERATED_SRC}/resources.cpp
 )
@@ -94,7 +94,7 @@ set_source_files_properties(${GENERATED_SRC}/resources.cpp PROPERTIES GENERATED
 
 # layout_default.xml
 add_custom_command(
-    COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/to_c_cmd.py < ${CMAKE_SOURCE_DIR}/src/layout_default.xml > ${GENERATED_SRC}/layout_default.xml.h
+    COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/to_c_cmd.py < ${CMAKE_SOURCE_DIR}/src/layout_default.xml > ${GENERATED_SRC}/layout_default.xml.h
     DEPENDS ${CMAKE_SOURCE_DIR}/src/layout_default.xml
     OUTPUT  ${GENERATED_SRC}/layout_default.xml.h
 )
@@ -124,7 +124,7 @@ foreach(lex_file ${LEX_FILES})
     set(LEX_FILES_H ${LEX_FILES_H} " " ${GENERATED_SRC}/${lex_file}.l.h CACHE INTERNAL "Stores generated files")
     set(LEX_FILES_CPP ${LEX_FILES_CPP} " " ${GENERATED_SRC}/${lex_file}.cpp CACHE INTERNAL "Stores generated files")
     add_custom_command(
-        COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/src/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h
+        COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/src/${lex_file}.l > ${GENERATED_SRC}/${lex_file}.l.h
         DEPENDS ${CMAKE_SOURCE_DIR}/src/scan_states.py ${CMAKE_SOURCE_DIR}/src/${lex_file}.l
         OUTPUT  ${GENERATED_SRC}/${lex_file}.l.h
     )
diff --git a/testing/CMakeLists.txt b/testing/CMakeLists.txt
index 40cb40b..a301acd 100644
--- a/testing/CMakeLists.txt
+++ b/testing/CMakeLists.txt
@@ -1,9 +1,9 @@
 add_custom_target(tests
          COMMENT "Running doxygen tests..."
-	 COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
+	 COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen ${PROJECT_BINARY_DIR}/bin/doxygen --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
          DEPENDS doxygen
 )
 add_test(NAME suite
-	COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen $<TARGET_FILE:doxygen> --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
+	COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/testing/runtests.py --doxygen $<TARGET_FILE:doxygen> --inputdir ${CMAKE_SOURCE_DIR}/testing --outputdir ${PROJECT_BINARY_DIR}/testing
 )