We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e8e278 commit ef73f33Copy full SHA for ef73f33
robotpy_build/autowrap/writer.py
@@ -1,6 +1,8 @@
1
import json
2
+import os
3
from os.path import join
4
import pathlib
5
+import pprint
6
import typing
7
8
import jinja2
@@ -9,6 +11,8 @@
9
11
10
12
templates_path = pathlib.Path(__file__).parent.absolute()
13
14
+_emit_j2_debug = os.getenv("RPYBUILD_J2_DEBUG") == "1"
15
+
16
17
class WrapperWriter:
18
def __init__(self) -> None:
@@ -50,6 +54,10 @@ def write_files(
50
54
# Jinja requires input as a dictionary
51
55
data = hctx.__dict__
52
56
57
+ if _emit_j2_debug:
58
+ with open(join(cxx_gen_dir, f"{name}.txt"), "w") as fp:
59
+ fp.write(pprint.pformat(hctx))
60
53
61
# Write the cpp file first
62
fname = join(cxx_gen_dir, f"{name}.cpp")
63
generated_sources.append(fname)
0 commit comments