-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: port to bzlmod #14
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,4 @@ | |
bazel-* | ||
__pycache__ | ||
user.bazelrc | ||
MODULE.bazel* | ||
MODULE.bazel.lock |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
module(name = "rules_ros", repo_name = "com_github_mvukov_rules_ros") | ||
|
||
bazel_dep(name = "bazel_skylib", version = "1.7.1") | ||
bazel_dep(name = "bzip2", version = "1.0.8.bcr.1") | ||
bazel_dep(name = "eigen", version = "3.4.0.bcr.1") | ||
bazel_dep(name = "gflags", version = "2.2.2") | ||
bazel_dep(name = "glog", version = "0.7.0") | ||
bazel_dep(name = "googletest", version = "1.14.0.bcr.1") | ||
bazel_dep(name = "lz4", version = "1.9.4") | ||
bazel_dep(name = "platforms", version = "0.0.10") | ||
bazel_dep(name = "rules_cc", version = "0.0.9") | ||
bazel_dep(name = "rules_foreign_cc", version = "0.10.1") | ||
bazel_dep(name = "rules_python", version = "0.33.1", dev_dependency=True) | ||
|
||
non_module_ros_repositories = use_extension("//extensions:ros_repositories.bzl", "non_module_dependencies") | ||
use_repo( | ||
non_module_ros_repositories, | ||
"console_bridge", | ||
"roscpp_core", | ||
"rosconsole", | ||
"ros_genmsg", | ||
"ros_gencpp", | ||
"ros_genpy", | ||
"ros_std_msgs", | ||
"ros_comm_msgs", | ||
"ros_comm", | ||
"ros_ros", | ||
"ros_common_msgs", | ||
"ros_actionlib", | ||
"ros_dynamic_reconfigure", | ||
"ros_geometry2", | ||
"orocos_kdl", | ||
"urdfdom_headers", | ||
"tinyxml", | ||
"urdfdom", | ||
) | ||
|
||
bazel_dep(name = "rules_boost") | ||
archive_override( | ||
module_name = "rules_boost", | ||
urls = "https://github.com/nelhage/rules_boost/archive/42d8155d8f20a1aee8ee20b7903a495bdfb9befd.zip", | ||
strip_prefix = "rules_boost-42d8155d8f20a1aee8ee20b7903a495bdfb9befd", | ||
integrity = "sha256-I1iTdF3qckTmDRab+0yjA37Iya9AOGvEGJVoPtfpADM=", | ||
) | ||
|
||
non_module_boost_repositories = use_extension("@rules_boost//:boost/repositories.bzl", "non_module_dependencies") | ||
use_repo( | ||
non_module_boost_repositories, | ||
"boost", | ||
) | ||
|
||
python = use_extension("@rules_python//python/extensions:python.bzl", "python") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In my other project rules_ros2, I suggest rules_python should be defined as dev dep here and should be set up in the user repo, mvukov/rules_ros2#238 (comment). I'd say the same applies here. We should not constrain our users which Python they are going to use. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
python.toolchain( | ||
is_default = True, | ||
python_version = "3.10", | ||
) | ||
use_repo(python, "python_3_10", "python_versions") | ||
|
||
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip") | ||
pip.parse( | ||
hub_name = "rules_ros_pip_deps", | ||
python_version = "3.10", | ||
requirements_lock = "@com_github_mvukov_rules_ros//:requirements_lock.txt", | ||
) | ||
use_repo(pip, "rules_ros_pip_deps") | ||
|
||
internal_deps = use_extension("@rules_python//python/private/bzlmod:internal_deps.bzl", "internal_deps") | ||
use_repo( | ||
internal_deps, | ||
"rules_python_internal", | ||
) |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
load("//repositories:repositories.bzl", "ros_repositories") | ||
|
||
def _non_module_dependencies_impl(_ctx): | ||
ros_repositories() | ||
|
||
non_module_dependencies = module_extension( | ||
implementation = _non_module_dependencies_impl, | ||
) |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the ugly part, but nothing we can do about that. I wish there was a way to import a variable from a repo.