Skip to content

Commit 23cebdd

Browse files
committed
Update robotpy-romi to semiwrap
1 parent 2494329 commit 23cebdd

File tree

11 files changed

+64
-48
lines changed

11 files changed

+64
-48
lines changed

subprojects/robotpy-romi/.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55

66
/build
77

8-
/romi/include
9-
/romi/lib
10-
/romi/_init_romi.py
11-
/romi/pkgcfg.py
8+
/romi/trampolines
9+
/romi/_init__romi.py
10+
/romi/romi.pc
1211
/romi/version.py

subprojects/robotpy-romi/meson.build

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
project('robotpy-romi', ['cpp'],
2+
default_options: ['warning_level=1', 'cpp_std=c++20',
3+
'b_colorout=auto', 'optimization=2', 'b_pie=true'])
4+
5+
subdir('semiwrap')
6+
7+
romi_sources += files(
8+
'romi/src/main.cpp',
9+
)
10+
11+
subdir('semiwrap/modules')

subprojects/robotpy-romi/pyproject.toml

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,54 @@
1-
[tool.robotpy-build.metadata]
1+
[build-system]
2+
build-backend = "hatchling.build"
3+
requires = [
4+
"semiwrap~=0.1",
5+
"hatch-meson~=0.1.0b2",
6+
"hatch-robotpy~=0.2",
7+
"hatchling",
8+
"robotpy-native-romi==2025.3.2",
9+
"wpilib==2025.3.2.2",
10+
]
11+
12+
13+
[project]
214
name = "robotpy-romi"
15+
version = "2025.3.2.2"
316
description = "Binary wrapper for WPILib Romi Vendor library"
4-
author = "RobotPy Development Team"
5-
author_email = "[email protected]"
6-
url = "https://github.com/robotpy/mostrobotpy"
17+
authors = [
18+
{name = "RobotPy Development Team", email = "[email protected]"},
19+
]
720
license = "BSD-3-Clause"
8-
install_requires = [
9-
"wpilib==THIS_VERSION"
21+
dependencies = [
22+
"wpilib==2025.3.2.2"
1023
]
1124

12-
[build-system]
13-
requires = [
14-
"robotpy-build~=2025.1.0",
15-
"wpilib~=2025.3.2"
16-
]
25+
[project.urls]
26+
"Source code" = "https://github.com/robotpy/mostrobotpy"
27+
28+
29+
[tool.hatch.build.hooks.robotpy]
30+
version_file = "romi/version.py"
31+
32+
[tool.hatch.build.hooks.semiwrap]
1733

18-
[tool.robotpy-build]
19-
base_package = "romi"
34+
[tool.hatch.build.hooks.meson]
2035

21-
[tool.robotpy-build.wrappers."romi"]
36+
[tool.hatch.build.targets.wheel]
37+
packages = ["romi"]
38+
39+
40+
[tool.semiwrap]
41+
update_init = ["romi"]
42+
43+
[tool.semiwrap.extension_modules."romi._romi"]
2244
name = "romi"
23-
sources = ["romi/src/main.cpp"]
24-
generation_data = "gen"
45+
wraps = ["robotpy-native-romi"]
2546
depends = [
26-
"wpilib_core", "wpilibc_interfaces", "wpilibc",
27-
"wpimath_cpp", "wpimath_geometry",
28-
"wpiHal", "wpiutil", "ntcore",
47+
"wpilib", "wpimath_geometry"
2948
]
3049

31-
[tool.robotpy-build.wrappers."romi".autogen_headers]
50+
[tool.semiwrap.extension_modules."romi._romi".headers]
3251
# frc/romi
3352
OnBoardIO = "frc/romi/OnBoardIO.h"
3453
RomiGyro = "frc/romi/RomiGyro.h"
3554
RomiMotor = "frc/romi/RomiMotor.h"
36-
37-
[tool.robotpy-build.wrappers."romi".maven_lib_download]
38-
artifact_id = "romiVendordep-cpp"
39-
group_id = "edu.wpi.first.romiVendordep"
40-
# repo_url = "https://frcmaven.wpi.edu/artifactory/release"
41-
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
42-
version = "2025.3.2"
43-
libs = ["romiVendordep"]
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
from . import _init_romi
1+
from . import _init__romi
22

3-
# autogenerated by 'robotpy-build create-imports romi'
3+
# autogenerated by 'semiwrap create-imports romi romi._romi'
44
from ._romi import OnBoardIO, RomiGyro, RomiMotor
55

66
__all__ = ["OnBoardIO", "RomiGyro", "RomiMotor"]
77

8-
del _init_romi
8+
del _init__romi

subprojects/robotpy-romi/romi/py.typed

Whitespace-only changes.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

2-
#include <rpygen_wrapper.hpp>
2+
#include <semiwrap_init.romi._romi.hpp>
33

4-
RPYBUILD_PYBIND11_MODULE(m) {
4+
SEMIWRAP_PYBIND11_MODULE(m) {
55
initWrapper(m);
66
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/meson.build
2+
/modules/meson.build
3+
/trampolines/meson.build

subprojects/robotpy-romi/gen/OnBoardIO.yml renamed to subprojects/robotpy-romi/semiwrap/OnBoardIO.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
---
21

32
classes:
4-
OnBoardIO:
3+
frc::OnBoardIO:
54
attributes:
65
kMessageInterval:
76
m_nextMessageTime:

subprojects/robotpy-romi/gen/RomiGyro.yml renamed to subprojects/robotpy-romi/semiwrap/RomiGyro.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
---
21

32
classes:
4-
RomiGyro:
3+
frc::RomiGyro:
54
methods:
65
RomiGyro:
76
GetAngle:
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
---
21

32
classes:
4-
RomiMotor:
3+
frc::RomiMotor:
54
methods:
65
RomiMotor:

0 commit comments

Comments
 (0)