2025-08-30 14:55:11 -04:00
|
|
|
# THIS FILE IS AUTO GENERATED
|
|
|
|
|
|
|
|
|
|
load("@aspect_bazel_lib//lib:copy_to_directory.bzl", "copy_to_directory")
|
2026-05-15 00:52:39 -04:00
|
|
|
load("//shared/bazel/rules/robotpy:robotpy_rules.bzl", "copy_native_file", "generate_native_files", "robotpy_library")
|
2025-08-30 14:55:11 -04:00
|
|
|
|
|
|
|
|
def define_native_wrapper(name, pyproject_toml = None):
|
2026-05-15 00:52:39 -04:00
|
|
|
pyproject_toml = pyproject_toml or "src/main/python/native-pyproject.toml"
|
|
|
|
|
|
2025-08-30 14:55:11 -04:00
|
|
|
copy_to_directory(
|
|
|
|
|
name = "{}.copy_headers".format(name),
|
|
|
|
|
srcs = native.glob(["src/main/native/include/**"]) + native.glob(["src/generated/main/native/include/**"], allow_empty = True) + native.glob([
|
|
|
|
|
"src/main/native/thirdparty/libuv/include/**",
|
|
|
|
|
"src/main/native/thirdparty/tcpsockets/include/**",
|
|
|
|
|
]),
|
|
|
|
|
out = "native/wpinet/include",
|
|
|
|
|
root_paths = ["src/main/native/include/"],
|
|
|
|
|
replace_prefixes = {
|
|
|
|
|
"wpinet/src/generated/main/native/include": "",
|
|
|
|
|
"wpinet/src/main/native/include": "",
|
|
|
|
|
"wpinet/src/main/native/thirdparty/libuv/include": "",
|
|
|
|
|
"wpinet/src/main/native/thirdparty/tcpsockets/include": "",
|
|
|
|
|
},
|
|
|
|
|
verbose = False,
|
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
|
)
|
|
|
|
|
|
2026-05-15 00:52:39 -04:00
|
|
|
libinit_files = ["native/wpinet/_init_robotpy_native_wpinet.py"]
|
|
|
|
|
|
|
|
|
|
generate_native_files(
|
2025-08-30 14:55:11 -04:00
|
|
|
name = name,
|
2026-05-15 00:52:39 -04:00
|
|
|
pyproject_toml = pyproject_toml,
|
2025-08-30 14:55:11 -04:00
|
|
|
pc_deps = [
|
|
|
|
|
"//wpiutil:native/wpiutil/robotpy-native-wpiutil.pc",
|
|
|
|
|
],
|
2026-05-15 00:52:39 -04:00
|
|
|
libinit_files = libinit_files,
|
|
|
|
|
pc_files = ["native/wpinet/robotpy-native-wpinet.pc"],
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
copy_native_file(
|
|
|
|
|
name = "wpinet",
|
|
|
|
|
library = "shared/wpinet",
|
|
|
|
|
base_path = "native/wpinet/",
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
robotpy_library(
|
|
|
|
|
name = name,
|
|
|
|
|
distribution = "robotpy-native-wpinet",
|
|
|
|
|
srcs = libinit_files,
|
|
|
|
|
data = [
|
|
|
|
|
name + ".pc_wrapper",
|
|
|
|
|
":wpinet.copy_lib",
|
|
|
|
|
"{}.copy_headers".format(name),
|
|
|
|
|
],
|
2025-08-30 14:55:11 -04:00
|
|
|
deps = [
|
|
|
|
|
"//wpiutil:robotpy-native-wpiutil",
|
|
|
|
|
],
|
2026-03-06 02:18:37 -05:00
|
|
|
summary = "WPILib Networking Library",
|
2026-05-15 00:52:39 -04:00
|
|
|
requires = ["robotpy-native-wpiutil==0.0.0"],
|
|
|
|
|
python_requires = ">=3.11",
|
|
|
|
|
strip_path_prefixes = ["wpinet"],
|
2026-03-06 02:18:37 -05:00
|
|
|
entry_points = {
|
|
|
|
|
"pkg_config": [
|
|
|
|
|
"wpinet = native.wpinet",
|
|
|
|
|
],
|
|
|
|
|
},
|
2025-08-30 14:55:11 -04:00
|
|
|
)
|