1
1
2
- # This section tells pip to install robotpy-build before starting a build
2
+ # This section tells pip to install semiwrap before starting a build
3
3
[build-system ]
4
- requires = [" robotpy-build" ]
5
-
6
- # Tells robotpy-build where to place autogenerated metadata
7
- [tool .robotpy-build ]
8
- base_package = " rpydemo"
9
-
10
- # This section configures the 'rpydemo' python package. Multiple
11
- # sections are possible to build multiple packages
12
- [tool .robotpy-build .wrappers ."rpydemo" ]
13
- name = " rpydemo"
14
-
15
- # C++ source files to compile, path is relative to the root of the project
16
- sources = [
17
- " rpydemo/src/demo.cpp" ,
18
- " rpydemo/src/main.cpp"
19
- ]
20
-
21
- # This is a directory that can be used to customize the autogenerated
22
- # C++ code
23
- # -> autogenerate those files via `robotpy-build create-gen`
24
- generation_data = " gen"
25
-
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
-
33
- # Standard python package metadata
34
- [tool .robotpy-build .metadata ]
35
- name = " robotpy-build-demo"
36
- description = " robotpy-build demo program"
37
- author = " RobotPy Development Team"
38
- author_email =
" [email protected] "
39
- url = " https://github.com/robotpy/robotpy-build"
40
- license = " BSD-3-Clause"
41
- install_requires = []
4
+ build-backend = " hatchling.build"
5
+ requires = [" semiwrap" , " hatch-meson" , " hatchling" ]
6
+
7
+ [project ]
8
+ name = " swdemo"
9
+ description = " Demo program"
10
+ version = " 0.0.1"
11
+
12
+ #
13
+ # hatch-semiwrap configuration
14
+ # .. this generates meson.build to perform autogen
15
+ #
16
+
17
+ [tool .hatch .build .hooks .semiwrap ]
18
+ # autogen_build_path = "autogen"
19
+
20
+ #
21
+ # hatch-meson configuration
22
+ # .. this executes meson to build python extension modules
23
+ #
24
+
25
+ [tool .hatch .build .hooks .meson ]
26
+
27
+
28
+ #
29
+ # semiwrap code generation configuration
30
+ #
31
+
32
+ [tool .semiwrap ]
33
+
34
+ [tool .semiwrap .extension_modules ."swdemo ._demo" ]
35
+ name = " demo"
36
+
37
+ [tool .semiwrap .extension_modules ."swdemo ._demo" .headers ]
38
+ demo = " include/demo.h"
0 commit comments