mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[copybara] Resync with mostrobotpy (#8662)
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user