-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[drake_bazel_external] Port to use MODULE.bazel
- Loading branch information
1 parent
96be1de
commit 76257f4
Showing
7 changed files
with
63 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
|
||
/bazel-* | ||
/user.bazelrc | ||
/MODULE.bazel.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# SPDX-License-Identifier: MIT-0 | ||
|
||
module(name = "drake_external_examples") | ||
|
||
# Add the Bazel rules we need. | ||
bazel_dep(name = "rules_cc", version = "0.0.17") | ||
bazel_dep(name = "rules_python", version = "0.40.0") | ||
|
||
# Here we introduce Drake as a module dependency, but note that Drake is not | ||
# published to any Bazel registry. Below, we'll override it with a github | ||
# source archive. | ||
bazel_dep(name = "drake") | ||
|
||
# By default, this example always uses the latest Drake master branch. | ||
DRAKE_COMMIT = "master" | ||
DRAKE_CHECKSUM = "" | ||
|
||
# You can choose a specific revision of Drake to use, e.g.: | ||
# DRAKE_COMMIT = "19bb4703fdf4950d4b3530d496d8a0ff1ca5fc22" | ||
# DRAKE_CHECKSUM = "489d255db3cb1c8ff7a91ae0f961d76b6083a1d4a3f58150371b4b359683adb6" | ||
# | ||
# You can also use DRAKE_COMMIT to choose a Drake release; e.g.: | ||
# DRAKE_COMMIT = "v0.15.0" | ||
# DRAKE_CHECKSUM = "... TBD ..." | ||
# | ||
# Before changing the COMMIT, temporarily uncomment the next line so that Bazel | ||
# displays the suggested new value for the CHECKSUM. | ||
# DRAKE_CHECKSUM = "0" * 64 | ||
|
||
# This declares the `@drake` module as a source code archive from github. | ||
# See README.md for instructions to use a local path, instead. | ||
archive_override( | ||
module_name = "drake", | ||
urls = [x.format(DRAKE_COMMIT) for x in [ | ||
"https://github.com/RobotLocomotion/drake/archive/{}.tar.gz", | ||
]], | ||
sha256 = DRAKE_CHECKSUM, | ||
strip_prefix = "drake-{}".format(DRAKE_COMMIT.lstrip("v")), | ||
) | ||
|
||
# Use the host system /usr/bin/python3. | ||
python_repository = use_repo_rule( | ||
"@drake//tools/workspace/python:repository.bzl", | ||
"python_repository", | ||
) | ||
|
||
python_repository( | ||
name = "python", | ||
linux_interpreter_path = "/usr/bin/python3", | ||
requirements_flavor = "build", | ||
) | ||
|
||
register_toolchains("@python//:all") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters