mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
This hooks up the bazel build to the robotpyExamples. It can use the (formly pyfrc or whatever) automatic unit tests for an example, as well as exposing the ability to run the example in simulation, with or without `halsim_gui` with a command such as `bazel run //robotpyExamples:AddressableLED-sim` This required building and using wheels instead of just a normal `py_library`, so that things like `ENTRY_POINTS` can be used. I took a bare bones approach to building and naming the wheels (for example the native ones don't have the OS info or python version in them, so they wouldn't be suitable publish to pypi, but that can always be updated later.
49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
def fixup_root_package_name(name):
|
|
if name == "wpihal":
|
|
return "hal"
|
|
if name == "wpilib":
|
|
return "wpilibc"
|
|
if name == "wpilog":
|
|
return "datalog"
|
|
if name == "xrp":
|
|
return "xrpVendordep"
|
|
if name == "romi":
|
|
return "romiVendordep"
|
|
if name == "pyntcore":
|
|
return "ntcore"
|
|
if name == "halsim-ws":
|
|
return "simulation/halsim_ws_core"
|
|
if name == "wpimath_test":
|
|
return "wpimath"
|
|
if name == "robotpy_apriltag":
|
|
return "apriltag"
|
|
return name
|
|
|
|
|
|
def fixup_native_lib_name(name):
|
|
return name
|
|
|
|
|
|
def fixup_shared_lib_name(name):
|
|
if name == "wpihal":
|
|
return "wpiHal"
|
|
if name == "hal":
|
|
return "wpiHal"
|
|
if name == "wpilib":
|
|
return "wpilibc"
|
|
if name == "xrp":
|
|
return "xrpVendordep"
|
|
if name == "romi":
|
|
return "romiVendordep"
|
|
return name
|
|
|
|
|
|
def fixup_python_dep_name(name):
|
|
if name == "robotpy-datalog":
|
|
return "robotpy-wpilog"
|
|
if name == "robotpy-ntcore":
|
|
return "pyntcore"
|
|
if name == "wpilib":
|
|
return "robotpy-wpilib"
|
|
return name
|