Skip to content

Commit f292131

Browse files
committed
Update docs + demos for autogen_headers
1 parent f47b8b7 commit f292131

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

docs/autowrap.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,13 @@ intervention:
4141
* C++ :ref:`class <class_templates>` and :ref:`function <function_templates>`
4242
templates
4343

44-
To tell the autogenerator to parse headers, you need to add a ``generate``
44+
To tell the autogenerator to parse headers, you need to add a ``autogen_headers``
4545
to your package in ``pyproject.toml``:
4646

4747
.. code-block:: toml
4848
49-
generate = [
50-
{ demo = "demo.h" }
51-
]
49+
[tool.robotpy-build.wrappers."MYPACKAGE".autogen_headers]
50+
demo = "demo.h"
5251
5352
That causes ``demo.h`` to be parsed and wrapped.
5453

examples/demo/pyproject.toml

+7-7
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@ sources = [
1818
"rpydemo/src/main.cpp"
1919
]
2020

21-
# This tells robotpy-build to parse include/demo.h and autogenerate pybind11
22-
# wrappers for the contents of the header.
23-
# -> autogenerate this via `robotpy-build scan-headers`
24-
generate = [
25-
{ demo = "demo.h" }
26-
]
27-
2821
# This is a directory that can be used to customize the autogenerated
2922
# C++ code
3023
# -> autogenerate those files via `robotpy-build create-gen`
3124
generation_data = "gen"
3225

26+
# This tells robotpy-build to parse include/demo.h and autogenerate pybind11
27+
# wrappers for the contents of the header.
28+
# -> autogenerate this via `robotpy-build scan-headers`
29+
[tool.robotpy-build.wrappers."rpydemo".autogen_headers]
30+
demo = "demo.h"
31+
32+
3333
# Standard python package metadata
3434
[tool.robotpy-build.metadata]
3535
name = "robotpy-build-demo"

0 commit comments

Comments
 (0)