Skip to content

Commit 1c8af90

Browse files
committed
Update robotpy-wpinet to semiwrap
1 parent d673205 commit 1c8af90

File tree

9 files changed

+65
-54
lines changed

9 files changed

+65
-54
lines changed

subprojects/robotpy-wpinet/.gitignore

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,9 @@
1010
__pycache__
1111
/wpinet/include
1212
/wpinet/lib
13-
/wpinet/py.typed
14-
/wpinet/_init_wpinet.py
15-
/wpinet/pkgcfg.py
13+
/wpinet/_init__wpinet.py
14+
/wpinet/wpinet.pc
15+
/wpinet/trampolines
1616
/wpinet/version.py
1717
/dist
1818
/build
19-
20-
/tests/cpp/build
21-
/tests/cpp/wpinet_test/_initmodule.py
22-
/tests/cpp/wpinet_test/pkgcfg.py
23-
/tests/cpp/wpinet_test/version.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
project('robotpy-wpinet', ['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+
wpinet_sources += files(
8+
'wpinet/src/main.cpp',
9+
)
10+
11+
subdir('semiwrap/modules')

subprojects/robotpy-wpinet/pyproject.toml

Lines changed: 42 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,54 @@
1-
[tool.robotpy-build]
2-
base_package = "wpinet"
1+
[build-system]
2+
build-backend = "hatchling.build"
3+
requires = [
4+
"semiwrap~=0.1",
5+
"hatch-meson~=0.1.0b2",
6+
"hatchling",
7+
"robotpy-native-wpinet==2025.3.2",
8+
"robotpy-wpiutil==2025.3.2.2"
9+
]
10+
11+
[project]
12+
name = "robotpy-wpinet"
13+
version = "2025.3.2.2"
14+
description = "Binary wrapper for FRC wpinet library"
15+
authors = [
16+
{name = "RobotPy Development Team", email = "[email protected]"},
17+
]
18+
license = "BSD-3-Clause"
19+
dependencies = [
20+
"robotpy-native-wpinet==2025.3.2",
21+
"robotpy-wpiutil==2025.3.2.2"
22+
]
23+
24+
[project.urls]
25+
"Source code" = "https://github.com/robotpy/mostrobotpy"
26+
27+
28+
[tool.hatch.build.hooks.robotpy]
29+
version_file = "wpinet/version.py"
30+
31+
[tool.hatch.build.hooks.semiwrap]
32+
33+
[tool.hatch.build.hooks.meson]
34+
35+
[tool.hatch.build.targets.wheel]
36+
packages = ["wpinet"]
37+
38+
39+
[tool.semiwrap]
340
update_init = [
441
"wpinet"
542
]
643
# we don't wrap anything here
744
scan_headers_ignore = ["*"]
845

9-
[tool.robotpy-build.wrappers."wpinet"]
46+
[tool.semiwrap.extension_modules."wpinet._wpinet"]
1047
name = "wpinet"
11-
sources = [
12-
"wpinet/src/main.cpp",
13-
]
14-
48+
wraps = ["robotpy-native-wpinet"]
1549
depends = ["wpiutil"]
16-
generation_data = "gen"
1750

18-
[tool.robotpy-build.wrappers."wpinet".maven_lib_download]
19-
artifact_id = "wpinet-cpp"
20-
group_id = "edu.wpi.first.wpinet"
21-
# repo_url = "https://frcmaven.wpi.edu/artifactory/release"
22-
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
23-
version = "2025.3.2"
24-
25-
libs = ["wpinet"]
26-
27-
[tool.robotpy-build.wrappers."wpinet".autogen_headers]
51+
[tool.semiwrap.extension_modules."wpinet._wpinet".headers]
2852
# wpinet
2953
PortForwarder = "wpinet/PortForwarder.h"
3054
WebServer = "wpinet/WebServer.h"
31-
32-
[tool.robotpy-build.metadata]
33-
name = "robotpy-wpinet"
34-
description = "Binary wrapper for FRC wpinet library"
35-
author = "RobotPy Development Team"
36-
author_email = "[email protected]"
37-
url = "https://github.com/robotpy/robotpy-wpinet"
38-
license = "BSD-3-Clause"
39-
install_requires = [
40-
"robotpy-wpiutil==THIS_VERSION",
41-
]
42-
43-
[build-system]
44-
requires = [
45-
"robotpy-build~=2025.1.0",
46-
"robotpy-wpiutil~=2025.3.2",
47-
]
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-wpinet/gen/PortForwarder.yml renamed to subprojects/robotpy-wpinet/semiwrap/PortForwarder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classes:
2-
PortForwarder:
2+
wpi::PortForwarder:
33
nodelete: true
44
methods:
55
GetInstance:

subprojects/robotpy-wpinet/gen/WebServer.yml renamed to subprojects/robotpy-wpinet/semiwrap/WebServer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22

33
classes:
4-
WebServer:
4+
wpi::WebServer:
55
nodelete: true
66
methods:
77
GetInstance:

subprojects/robotpy-wpinet/setup.py

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
from . import _init_wpinet
1+
from . import _init__wpinet
22

33

4-
# autogenerated by 'robotpy-build create-imports wpinet wpinet._wpinet'
4+
# autogenerated by 'semiwrap create-imports wpinet wpinet._wpinet'
55
from ._wpinet import PortForwarder, WebServer
66

77
__all__ = ["PortForwarder", "WebServer"]
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

2-
#include <rpygen_wrapper.hpp>
2+
#include <semiwrap_init.wpinet._wpinet.hpp>
33

4-
RPYBUILD_PYBIND11_MODULE(m) { initWrapper(m); }
4+
SEMIWRAP_PYBIND11_MODULE(m) { initWrapper(m); }

0 commit comments

Comments
 (0)