Skip to content

Commit c39cdb8

Browse files
committed
Update robotpy-halsim-ds-socket to use hatch-robotpy
1 parent ee7e54b commit c39cdb8

File tree

5 files changed

+40
-35
lines changed

5 files changed

+40
-35
lines changed

subprojects/robotpy-halsim-ds-socket/.gitignore

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

15-
/halsim_ds_socket/_init_halsim_ds_socket.py
16-
/halsim_ds_socket/pkgcfg.py
1715
/halsim_ds_socket/version.py
18-
/halsim_ds_socket/include
1916
/halsim_ds_socket/lib

subprojects/robotpy-halsim-ds-socket/halsim_ds_socket/py.typed

Whitespace-only changes.
Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,40 @@
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-ds-socket"
10+
version = "2025.3.2.2"
311
description = "WPILib simulator DS Socket Extension"
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 = ["ds-socket = halsim_ds_socket"]
21+
[project.entry-points.robotpysimext]
22+
ds-socket = "halsim_ds_socket"
1523

16-
[build-system]
17-
requires = [
18-
"robotpy-build~=2025.1.0",
19-
"robotpy-hal~=2025.3.2",
20-
"robotpy-wpinet~=2025.3.2",
21-
]
2224

23-
[tool.robotpy-build]
24-
base_package = "halsim_ds_socket"
25+
[tool.hatch.build.hooks.robotpy]
26+
version_file = "halsim_ds_socket/version.py"
2527

26-
[tool.robotpy-build.wrappers."halsim_ds_socket".maven_lib_download]
28+
[[tool.hatch.build.hooks.robotpy.maven_lib_download]]
2729
artifact_id = "halsim_ds_socket"
2830
group_id = "edu.wpi.first.halsim"
29-
# repo_url = "https://frcmaven.wpi.edu/artifactory/release"
3031
repo_url = "https://frcmaven.wpi.edu/artifactory/release"
3132
version = "2025.3.2"
33+
use_headers = false
3234

33-
dlopenlibs = ["halsim_ds_socket"]
34-
35-
[tool.robotpy-build.wrappers."halsim_ds_socket"]
36-
name = "halsim_ds_socket"
37-
depends = ["wpiHal", "wpinet"]
35+
extract_to = "halsim_ds_socket"
36+
libs = ["halsim_ds_socket"]
3837

3938

39+
[tool.hatch.build.targets.wheel]
40+
packages = ["halsim_ds_socket"]

subprojects/robotpy-halsim-ds-socket/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_ds_socket._init_halsim_ds_socket
1+
import ctypes
2+
import pathlib
33

44

55
def test_halsim_ds_socket():
6-
pass
6+
# dependencies
7+
import native.wpihal._init_robotpy_native_wpihal
8+
import native.wpinet._init_robotpy_native_wpinet
9+
10+
import halsim_ds_socket 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)