Skip to content

Commit ffd3d75

Browse files
committed
Split datalog from wpiutil
1 parent 3f9d0c4 commit ffd3d75

File tree

18 files changed

+174
-18
lines changed

18 files changed

+174
-18
lines changed

rdev.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ hatch-robotpy = "~=0.2.1"
4444
py_version = "native"
4545
robot = true
4646

47+
[subprojects."robotpy-native-datalog"]
48+
py_version = "native"
49+
robot = true
50+
4751
[subprojects."robotpy-native-wpinet"]
4852
py_version = "native"
4953
robot = true
@@ -80,6 +84,10 @@ robot = false
8084
py_version = "wrapper"
8185
robot = true
8286

87+
[subprojects."robotpy-wpilog"]
88+
py_version = "wrapper"
89+
robot = true
90+
8391
[subprojects."robotpy-wpinet"]
8492
py_version = "wrapper"
8593
robot = true
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist
2+
/src
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[build-system]
2+
build-backend = "hatchling.build"
3+
requires = [
4+
"hatchling",
5+
"hatch-nativelib~=0.2.0",
6+
"hatch-robotpy~=0.2.1",
7+
"robotpy-native-wpiutil==2027.0.0a2",
8+
]
9+
10+
[project]
11+
name = "robotpy-native-datalog"
12+
version = "2027.0.0a2"
13+
description = "WPILib Utility Library"
14+
license = "BSD-3-Clause"
15+
16+
dependencies = [
17+
"robotpy-native-wpiutil==2027.0.0a2",
18+
]
19+
20+
[tool.hatch.build.targets.wheel]
21+
packages = ["src/native"]
22+
23+
24+
[[tool.hatch.build.hooks.robotpy.maven_lib_download]]
25+
artifact_id = "datalog-cpp"
26+
group_id = "edu.wpi.first.datalog"
27+
repo_url = "https://frcmaven.wpi.edu/artifactory/release-2027"
28+
version = "2027.0.0-alpha-2"
29+
30+
extract_to = "src/native/datalog"
31+
libs = ["datalog"]
32+
33+
[[tool.hatch.build.hooks.nativelib.pcfile]]
34+
pcfile = "src/native/datalog/robotpy-native-datalog.pc"
35+
name = "datalog"
36+
37+
includedir = "src/native/datalog/include"
38+
libdir = "src/native/datalog/lib"
39+
shared_libraries = ["datalog"]
40+
requires = ["robotpy-native-wpiutil"]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/build
2+
/dist
3+
*.pc
4+
*.so
5+
*.dll
6+
*.dylib
7+
8+
/wpilog/_init__wpilog.py
9+
/wpilog/version.py
10+
/wpilog/trampolines
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
project('robotpy-wpilog', ['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+
wpilog_sources += files(
8+
'src/main.cpp',
9+
)
10+
11+
subdir('semiwrap/modules')
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[build-system]
2+
build-backend = "hatchling.build"
3+
requires = [
4+
"semiwrap~=0.1.4",
5+
"hatch-meson~=0.1.0b2",
6+
"hatchling",
7+
"robotpy-native-datalog==2027.0.0a2",
8+
"robotpy-wpiutil==2027.0.0a2"
9+
]
10+
11+
[project]
12+
name = "robotpy-wpilog"
13+
version = "2027.0.0a2"
14+
description = "Binary wrapper for FRC wpilog library"
15+
authors = [
16+
{name = "RobotPy Development Team", email = "[email protected]"},
17+
]
18+
license = "BSD-3-Clause"
19+
dependencies = [
20+
"robotpy-native-datalog==2027.0.0a2",
21+
"robotpy-wpiutil==2027.0.0a2"
22+
]
23+
24+
[project.urls]
25+
"Source code" = "https://github.com/robotpy/mostrobotpy"
26+
27+
28+
[tool.hatch.build.hooks.robotpy]
29+
version_file = "wpilog/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 = ["wpilog"]
37+
38+
39+
[tool.semiwrap]
40+
update_init = [
41+
"wpilog"
42+
]
43+
scan_headers_ignore = [
44+
# wpi/datalog
45+
"wpi/datalog/DataLog_c.h",
46+
"wpi/datalog/DataLogReaderThread.h",
47+
"wpi/datalog/FileLogger.h",
48+
]
49+
50+
[tool.semiwrap.extension_modules."wpilog._wpilog"]
51+
name = "wpilog"
52+
wraps = ["robotpy-native-datalog"]
53+
depends = ["wpiutil"]
54+
55+
[tool.semiwrap.extension_modules."wpilog._wpilog".headers]
56+
# wpi/datalog
57+
DataLog = "wpi/datalog/DataLog.h"
58+
DataLogBackgroundWriter = "wpi/datalog/DataLogBackgroundWriter.h"
59+
DataLogReader = "wpi/datalog/DataLogReader.h"
60+
# DataLogReaderThread = "wpi/datalog/DataLogReaderThread.h"
61+
DataLogWriter = "wpi/datalog/DataLogWriter.h"
62+
# DataLog_c = "wpi/datalog/DataLog_c.h"
63+
# FileLogger = "wpi/datalog/FileLogger.h"
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-wpiutil/semiwrap/DataLog.yml renamed to subprojects/robotpy-wpilog/semiwrap/DataLog.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
defaults:
2-
ignore: true
3-
report_ignored_missing: false
4-
subpackage: log
1+
---
2+
# defaults:
3+
# ignore: true
4+
# report_ignored_missing: false
55
enums:
66
ControlRecordType:
77
classes:

subprojects/robotpy-wpiutil/semiwrap/DataLogBackgroundWriter.yml renamed to subprojects/robotpy-wpilog/semiwrap/DataLogBackgroundWriter.yml

File renamed without changes.

subprojects/robotpy-wpiutil/semiwrap/DataLogReader.yml renamed to subprojects/robotpy-wpilog/semiwrap/DataLogReader.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
defaults:
2-
subpackage: log
3-
41

52
classes:
63
wpi::log::StartRecordData:

0 commit comments

Comments
 (0)