[copybara] Resync with mostrobotpy (#8662)

This commit is contained in:
PJ Reiniger
2026-03-09 00:38:21 -04:00
committed by GitHub
parent 71cd434699
commit c0f8159540
40 changed files with 181 additions and 79 deletions

View File

@@ -36,7 +36,21 @@ includedir = "src/native/wpiutil/include"
libdir = "src/native/wpiutil/lib"
shared_libraries = ["wpiutil"]
enable_if = "platform_system != 'Windows'"
enable_if = "platform_system != 'Windows' and platform_machine != 'aarch64'"
[[tool.hatch.build.hooks.nativelib.pcfile]]
pcfile = "src/native/wpiutil/robotpy-native-wpiutil.pc"
name = "wpiutil"
includedir = "src/native/wpiutil/include"
libdir = "src/native/wpiutil/lib"
shared_libraries = ["wpiutil"]
# abi warnings are obnoxious on arm
extra_cflags = "-Wno-psabi"
enable_if = "platform_system != 'Windows' and platform_machine == 'aarch64'"
[[tool.hatch.build.hooks.nativelib.pcfile]]
pcfile = "src/native/wpiutil/robotpy-native-wpiutil.pc"

View File

@@ -1,7 +1,7 @@
[build-system]
build-backend = "hatchling.build"
requires = [
"semiwrap~=0.2.6",
"semiwrap~=0.3.0",
"hatch-meson~=0.1.0",
"hatch-robotpy~=0.2.1",
"hatchling",

View File

@@ -1,15 +1,4 @@
from typing import ClassVar, Protocol
try:
from typing import TypeGuard
except ImportError:
try:
from typing_extensions import TypeGuard
except ImportError:
# Runtime fallback for Python 3.9 without typing_extensions
class TypeGuard:
def __class_getitem__(cls, key):
return bool
from typing import ClassVar, Protocol, TypeGuard
class StructSerializable(Protocol):

View File

@@ -9,9 +9,9 @@ def test_load_array_int():
def test_load_array_annotation():
assert (
module.load_array_int.__doc__
== "load_array_int(arg0: Tuple[typing.SupportsInt, typing.SupportsInt, typing.SupportsInt, typing.SupportsInt]) -> Tuple[int, int, int, int]\n"
== "load_array_int(arg0: Tuple[typing.SupportsInt | typing.SupportsIndex, typing.SupportsInt | typing.SupportsIndex, typing.SupportsInt | typing.SupportsIndex, typing.SupportsInt | typing.SupportsIndex]) -> Tuple[int, int, int, int]\n"
)
assert (
module.load_array_int1.__doc__
== "load_array_int1(arg0: Tuple[typing.SupportsInt]) -> Tuple[int]\n"
== "load_array_int1(arg0: Tuple[typing.SupportsInt | typing.SupportsIndex]) -> Tuple[int]\n"
)