diff --git a/WORKSPACE.in b/WORKSPACE.in index 6e03abae97c..06a6ed09f82 100644 --- a/WORKSPACE.in +++ b/WORKSPACE.in @@ -269,12 +269,6 @@ new_local_repository( path = "/usr", ) -new_local_repository( - name = "python3", - build_file = "third_party/python3.BUILD", - path = "/usr", -) - # PyTorch new_local_repository( name = "pytorch", diff --git a/cyber/py_wrapper/BUILD b/cyber/py_wrapper/BUILD index 5de49e08493..cab88296ddb 100644 --- a/cyber/py_wrapper/BUILD +++ b/cyber/py_wrapper/BUILD @@ -37,7 +37,7 @@ cc_library( defines = ["PY_MAJOR_VERSION=3"], deps = [ "//cyber:cyber_core", - "@python3", + "//third_party:python3", ], ) @@ -86,7 +86,7 @@ cc_library( deps = [ "//cyber/message:py_message", "//cyber/record", - "@python3", + "//third_party:python3", ], ) @@ -136,8 +136,8 @@ cc_library( defines = ["PY_MAJOR_VERSION=3"], deps = [ "//cyber:cyber_core", + "//third_party:python3", "@fastrtps", - "@python3", ], ) @@ -174,7 +174,7 @@ cc_library( defines = ["PY_MAJOR_VERSION=3"], deps = [ "//cyber:cyber_core", - "@python3", + "//third_party:python3", ], ) @@ -213,7 +213,7 @@ cc_library( deps = [ ":py3_cyber", "//cyber:cyber_core", - "@python3", + "//third_party:python3", ], ) diff --git a/third_party/BUILD b/third_party/BUILD index b559c19a161..c8ebb77134b 100644 --- a/third_party/BUILD +++ b/third_party/BUILD @@ -1,13 +1,10 @@ package(default_visibility = ["//visibility:public"]) -cc_library( - name = "uuid", - linkopts = ["-luuid"], -) +# Libs provided by the system. cc_library( - name = "rt", - linkopts = ["-lrt"], + name = "ncurses", + linkopts = ["-lncurses"], ) cc_library( @@ -16,6 +13,16 @@ cc_library( ) cc_library( - name = "ncurses", - linkopts = ["-lncurses"], + name = "python3", + linkopts = ["-lpython3.6m"], +) + +cc_library( + name = "rt", + linkopts = ["-lrt"], +) + +cc_library( + name = "uuid", + linkopts = ["-luuid"], ) diff --git a/third_party/python3.BUILD b/third_party/python3.BUILD deleted file mode 100644 index 761fb2c7488..00000000000 --- a/third_party/python3.BUILD +++ /dev/null @@ -1,32 +0,0 @@ -package(default_visibility = ["//visibility:public"]) - -licenses(["notice"]) - -cc_library( - name = "python3", - srcs = select( - { - ":x86_mode": glob([ - "lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6.so", - ]), - ":arm_mode": glob([ - "lib/python3.6/config-3.6m-aarch64-linux-gnu/libpython3.6.so", - ]), - }, - no_match_error = "Please Build with an ARM or Linux x86_64 platform", - ), - hdrs = glob([ - "include/python3.6/*.h", - ]), - includes = ["include/python3.6"], -) - -config_setting( - name = "x86_mode", - values = {"cpu": "k8"}, -) - -config_setting( - name = "arm_mode", - values = {"cpu": "arm"}, -)