Skip to content

Commit

Permalink
Update for newer bazel/lcm.
Browse files Browse the repository at this point in the history
  • Loading branch information
sammy-tri committed Aug 2, 2022
1 parent 798901e commit f88ab09
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 17 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ pkg_config_repository(
http_archive(
name = "lcm",
build_file = "//tools:lcm.BUILD",
sha256 = "8bf90431eacb982cd8a7715ec566f0d94e1dbab849d0a7af1db45b384559935d",
strip_prefix = "lcm-a059d86deaca39d8c355a02da01b251fb62e3b80",
urls = ["https://github.com/lcm-proj/lcm/archive/a059d86deaca39d8c355a02da01b251fb62e3b80.tar.gz"],
sha256 = "8ea0076d2f2158fc750fec697b68c6903a9d70ccbe4e3f24240415a13445381f", # noqa
strip_prefix = "lcm-91ce7a2ae46ad05f8a232f5fe32a06cccbead1c2",
urls = ["https://github.com/lcm-proj/lcm/archive/91ce7a2ae46ad05f8a232f5fe32a06cccbead1c2.tar.gz"],
)

java_import_external(
Expand Down
1 change: 1 addition & 0 deletions tools/lcm.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ cc_binary(
"lcmgen/emit_c.c",
"lcmgen/emit_cpp.c",
"lcmgen/emit_csharp.c",
"lcmgen/emit_go.c",
"lcmgen/emit_java.c",
"lcmgen/emit_lua.c",
"lcmgen/emit_python.c",
Expand Down
19 changes: 5 additions & 14 deletions tools/python.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Arguments:
"""

load("//tools:execute.bzl", "which")
load("//tools:os.bzl", "determine_os")

def _impl(repository_ctx):
python_config = which(repository_ctx, "python{}-config".format(
Expand Down Expand Up @@ -83,18 +82,6 @@ def _impl(repository_ctx):

linkopts_direct_link = list(linkopts)

os_result = determine_os(repository_ctx)
if os_result.error != None:
fail(os_result.error)

if os_result.is_macos:
for i in reversed(range(len(linkopts))):
if linkopts[i].find("python{}".format(
repository_ctx.attr.version,
)) != -1:
linkopts.pop(i)
linkopts = ["-undefined dynamic_lookup"] + linkopts

file_content = """# -*- python -*-
# DO NOT EDIT: generated by python_repository()
Expand All @@ -106,7 +93,11 @@ licenses(["notice"]) # Python-2.0
# may be nested within `/usr/include/python2.7`, such as `numpy` when installed
# via `apt` on Ubuntu.
headers = glob(
["include/*/*"],
[
"include/*/*",
"include/*/cpython/*",
"include/*/internal/*",
],
exclude_directories = 1,
)
Expand Down

0 comments on commit f88ab09

Please sign in to comment.