2022-10-31 11:17:00 -05:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
import shutil
|
|
|
|
|
|
2024-11-02 17:56:55 -07:00
|
|
|
from upstream_utils import Lib, walk_cwd_and_copy_if
|
2022-10-31 11:17:00 -05:00
|
|
|
|
|
|
|
|
|
2024-07-16 17:20:07 -07:00
|
|
|
def copy_upstream_src(wpilib_root):
|
2022-10-31 11:17:00 -05:00
|
|
|
wpimath = os.path.join(wpilib_root, "wpimath")
|
|
|
|
|
|
|
|
|
|
# Delete old install
|
|
|
|
|
for d in [
|
|
|
|
|
"src/main/native/thirdparty/gcem/include",
|
|
|
|
|
]:
|
|
|
|
|
shutil.rmtree(os.path.join(wpimath, d), ignore_errors=True)
|
|
|
|
|
|
|
|
|
|
# Copy gcem include files into allwpilib
|
2024-07-20 07:01:06 -07:00
|
|
|
walk_cwd_and_copy_if(
|
2024-08-24 09:52:52 -04:00
|
|
|
lambda dp, f: dp.startswith(os.path.join(".", "include")),
|
2022-10-31 11:17:00 -05:00
|
|
|
os.path.join(wpimath, "src/main/native/thirdparty/gcem"),
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
2024-07-16 17:20:07 -07:00
|
|
|
def main():
|
|
|
|
|
name = "gcem"
|
|
|
|
|
url = "https://github.com/kthohr/gcem.git"
|
|
|
|
|
tag = "v1.18.0"
|
|
|
|
|
|
2024-07-23 15:58:15 -07:00
|
|
|
gcem = Lib(name, url, tag, copy_upstream_src)
|
2024-07-16 17:20:07 -07:00
|
|
|
gcem.main()
|
|
|
|
|
|
|
|
|
|
|
2022-10-31 11:17:00 -05:00
|
|
|
if __name__ == "__main__":
|
|
|
|
|
main()
|