Skip to content

Commit

Permalink
Merge branch 'main' into friendly-bazelrc-options
Browse files Browse the repository at this point in the history
  • Loading branch information
lalten authored Sep 2, 2024
2 parents 4b9889f + 8895950 commit 70a83aa
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ repos:
- id: reorder-python-imports
args: [--py37-plus]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.1
rev: v0.6.3
hooks:
- id: ruff
args: [--fix, --show-fixes, --exit-non-zero-on-fix]
Expand Down
2 changes: 0 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ python_register_toolchains(

load("@rules_python//python:pip.bzl", "pip_parse")
load("@rules_ros2_python//:defs.bzl", python_interpreter_target = "interpreter")
load("//repositories:pip_annotations.bzl", "PIP_ANNOTATIONS")

pip_parse(
name = "rules_ros2_pip_deps",
annotations = PIP_ANNOTATIONS,
python_interpreter_target = python_interpreter_target,
requirements_lock = "@com_github_mvukov_rules_ros2//:requirements_lock.txt",
)
Expand Down
2 changes: 0 additions & 2 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,11 @@ python_register_toolchains(
python_version = "3.10",
)

load("@com_github_mvukov_rules_ros2//repositories:pip_annotations.bzl", "PIP_ANNOTATIONS")
load("@rules_python//python:pip.bzl", "pip_parse")
load("@rules_ros2_python//:defs.bzl", python_interpreter_target = "interpreter")

pip_parse(
name = "rules_ros2_pip_deps",
annotations = PIP_ANNOTATIONS,
python_interpreter_target = python_interpreter_target,
requirements_lock = "@com_github_mvukov_rules_ros2//:requirements_lock.txt",
)
Expand Down
3 changes: 0 additions & 3 deletions repositories/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
load("@rules_python//python:defs.bzl", "py_binary")

exports_files([
"deps.bzl",
"logging_macros.bzl",
"generate_rclcpp_interface.py",
"generate_rclcpp_logging_macros.py",
"generate_rcutils_logging_macros.py",
"pip_annotations.bzl",
"rclcpp_interfaces.bzl",
"repositories.bzl",
"ros2_repo_mappings.yaml",
Expand Down
14 changes: 0 additions & 14 deletions repositories/pip_annotations.bzl

This file was deleted.

12 changes: 6 additions & 6 deletions repositories/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def ros2_workspace_repositories():
http_archive,
name = "pybind11",
build_file = "@com_github_mvukov_rules_ros2//repositories:pybind11.BUILD.bazel",
sha256 = "efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240",
strip_prefix = "pybind11-2.13.4",
urls = ["https://github.com/pybind/pybind11/archive/refs/tags/v2.13.4.tar.gz"],
sha256 = "b1e209c42b3a9ed74da3e0b25a4f4cd478d89d5efbb48f04b277df427faf6252",
strip_prefix = "pybind11-2.13.5",
urls = ["https://github.com/pybind/pybind11/archive/refs/tags/v2.13.5.tar.gz"],
)

maybe(
Expand Down Expand Up @@ -140,9 +140,9 @@ def ros2_workspace_repositories():
maybe(
http_archive,
name = "boringssl",
sha256 = "b282f3dcf29bd3d83b79a59caf1a17cfa53a5b339e3391718ae35cfcd0ade2a4",
strip_prefix = "boringssl-e056e3e52e1dd0e5909fe43d4a684a0c9e96f1f9",
urls = ["https://github.com/hedronvision/boringssl/archive/e056e3e52e1dd0e5909fe43d4a684a0c9e96f1f9.tar.gz"],
sha256 = "905ca095ec7974a3a613b48201e128f54efc6a4a0e11b1bcaad8d1f65f077d81",
strip_prefix = "boringssl-f5fed871693b4f5dab8e7f4baf083306af2327b9",
urls = ["https://github.com/hedronvision/boringssl/archive/f5fed871693b4f5dab8e7f4baf083306af2327b9.tar.gz"],
)

maybe(
Expand Down
16 changes: 16 additions & 0 deletions ros2/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
""" ROS 2 common definitions.
"""

load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
load("@rules_python//python:pip.bzl", "whl_filegroup")

exports_files([
"ament.bzl",
Expand Down Expand Up @@ -65,3 +67,17 @@ py_binary(
"@ros2cli//:ros2lifecycle",
],
)

whl_filegroup(
name = "numpy_includes",
pattern = "numpy/core/include/numpy",
whl = "@rules_ros2_pip_deps//numpy:whl",
)

cc_library(
name = "rules_ros2_pip_deps_numpy_headers",
hdrs = [":numpy_includes"],
includes = ["numpy_includes/numpy/core/include"],
visibility = ["//visibility:public"],
deps = ["@rules_python//python/cc:current_py_cc_headers"],
)
2 changes: 1 addition & 1 deletion ros2/interfaces.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ py_generator_aspect = aspect(
"_py_ext_c_deps": attr.label_list(
default = [
Label("@rules_python//python/cc:current_py_cc_headers"),
Label("@rules_ros2_pip_deps_numpy//:headers"),
Label("@com_github_mvukov_rules_ros2//ros2:rules_ros2_pip_deps_numpy_headers"),
],
providers = [CcInfo],
),
Expand Down

0 comments on commit 70a83aa

Please sign in to comment.