Skip to content

Commit 34ab1c3

Browse files
committed
Update robotpy-halsim-ws to use hatch-robotpy
1 parent c39cdb8 commit 34ab1c3

File tree

6 files changed

+63
-52
lines changed

6 files changed

+63
-52
lines changed

subprojects/robotpy-halsim-ws/.gitignore

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,5 @@
1313
*.egg-info
1414

1515
/halsim_ws/version.py
16-
17-
/halsim_ws/server/_init_server.py
18-
/halsim_ws/server/pkgcfg.py
19-
/halsim_ws/server/include
2016
/halsim_ws/server/lib
21-
22-
/halsim_ws/client/_init_client.py
23-
/halsim_ws/client/pkgcfg.py
24-
/halsim_ws/client/include
2517
/halsim_ws/client/lib

subprojects/robotpy-halsim-ws/halsim_ws/py.typed

Whitespace-only changes.
Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,55 @@
1-
[tool.robotpy-build.metadata]
1+
[build-system]
2+
build-backend = "hatchling.build"
3+
requires = [
4+
"hatchling",
5+
"hatch-robotpy~=0.2",
6+
]
7+
8+
[project]
29
name = "robotpy-halsim-ws"
10+
version = "2025.3.2.2"
311
description = "WPILib simulator websim Extensions"
4-
author = "RobotPy Development Team"
5-
author_email = "[email protected]"
6-
url = "https://github.com/robotpy/robotpy-halsim-gui"
12+
authors = [
13+
{name = "RobotPy Development Team", email = "[email protected]"},
14+
]
715
license = "BSD-3-Clause"
8-
install_requires = [
9-
"robotpy-hal==THIS_VERSION",
10-
"robotpy-wpinet==THIS_VERSION",
16+
dependencies = [
17+
"robotpy-native-wpihal==2025.3.2",
18+
"robotpy-native-wpinet==2025.3.2",
1119
]
1220

13-
[tool.robotpy-build.metadata.entry_points]
14-
robotpysimext = [
15-
"ws-server = halsim_ws.server",
16-
"ws-client = halsim_ws.client",
17-
]
21+
[project.entry-points.robotpysimext]
22+
ws-server = "halsim_ws.server"
23+
ws-client = "halsim_ws.client"
1824

25+
[project.urls]
26+
"Source code" = "https://github.com/robotpy/mostrobotpy"
1927

20-
[build-system]
21-
requires = [
22-
"robotpy-build~=2025.1.0",
23-
"robotpy-hal~=2025.3.2",
24-
"robotpy-wpinet~=2025.3.2",
25-
]
2628

27-
[tool.robotpy-build]
28-
base_package = "halsim_ws"
29+
[tool.hatch.build.hooks.robotpy]
30+
version_file = "halsim_ws/version.py"
2931

30-
[tool.robotpy-build.wrappers."halsim_ws.server".maven_lib_download]
32+
33+
[[tool.hatch.build.hooks.robotpy.maven_lib_download]]
3134
artifact_id = "halsim_ws_server"
3235
group_id = "edu.wpi.first.halsim"
33-
# repo_url = "https://frcmaven.wpi.edu/artifactory/release"
3436
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
3537
version = "2025.3.2"
38+
use_headers = false
3639

37-
dlopenlibs = ["halsim_ws_server"]
38-
39-
[tool.robotpy-build.wrappers."halsim_ws.server"]
40-
name = "server"
41-
depends = ["wpiHal", "wpinet"]
40+
extract_to = "halsim_ws/server"
41+
libs = ["halsim_ws_server"]
4242

43-
[tool.robotpy-build.wrappers."halsim_ws.client".maven_lib_download]
43+
[[tool.hatch.build.hooks.robotpy.maven_lib_download]]
4444
artifact_id = "halsim_ws_client"
4545
group_id = "edu.wpi.first.halsim"
46-
# repo_url = "https://frcmaven.wpi.edu/artifactory/release"
4746
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
4847
version = "2025.3.2"
48+
use_headers = false
4949

50-
dlopenlibs = ["halsim_ws_client"]
50+
extract_to = "halsim_ws/client"
51+
libs = ["halsim_ws_client"]
5152

52-
[tool.robotpy-build.wrappers."halsim_ws.client"]
53-
name = "client"
54-
depends = ["wpiHal", "wpinet", "wpiutil"]
5553

54+
[tool.hatch.build.targets.wheel]
55+
packages = ["halsim_ws"]

subprojects/robotpy-halsim-ws/setup.py

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
# tests the internals
2-
import halsim_ws.client._init_client
1+
import ctypes
2+
import pathlib
33

44

55
def test_halsim_ws_client():
6-
pass
6+
# dependencies
7+
import native.wpihal._init_robotpy_native_wpihal
8+
import native.wpinet._init_robotpy_native_wpinet
9+
10+
import halsim_ws.client as base
11+
12+
loaded = 0
13+
for fname in (pathlib.Path(base.__file__).parent / "lib").iterdir():
14+
if fname.is_file() and fname.suffix in (".dll", ".dylib", ".so"):
15+
ctypes.CDLL(str(fname))
16+
loaded += 1
17+
18+
assert loaded
Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
1-
# tests the internals
2-
import halsim_ws.server._init_server
1+
import ctypes
2+
import pathlib
33

44

55
def test_halsim_ws_server():
6-
pass
6+
# dependencies
7+
import native.wpihal._init_robotpy_native_wpihal
8+
import native.wpinet._init_robotpy_native_wpinet
9+
10+
import halsim_ws.server as base
11+
12+
loaded = 0
13+
for fname in (pathlib.Path(base.__file__).parent / "lib").iterdir():
14+
if fname.is_file() and fname.suffix in (".dll", ".dylib", ".so"):
15+
ctypes.CDLL(str(fname))
16+
loaded += 1
17+
18+
assert loaded

0 commit comments

Comments
 (0)