Skip to content

Commit cd83eb6

Browse files
committed
Add python lib, better formatting
1 parent 15b09f1 commit cd83eb6

6 files changed

Lines changed: 188 additions & 116 deletions

File tree

.bazelrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22

33
build --incompatible_enable_cc_toolchain_resolution
44
build --platforms=//:arm_none_eabi
5+
build:firmware --platforms=//:arm_none_eabi
6+
run --platforms=@platforms//host

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,5 @@ bazel*
7474
.cache
7575
build/
7676
.stm32env
77-
compile_commands.json
77+
compile_commands.json
78+
external/

MODULE.bazel

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,28 @@ arm_toolchain.arm_none_eabi(version = "13.2.1")
1414
use_repo(arm_toolchain, "arm_none_eabi")
1515
# register_toolchains("@arm_none_eabi//toolchain:all")
1616
register_toolchains("//toolchain:all")
17+
18+
bazel_dep(name = "rules_python", version = "1.5.3")
19+
20+
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
21+
python.toolchain(
22+
python_version = "3.13",
23+
)
24+
25+
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
26+
pip.parse(
27+
hub_name = "pypi",
28+
python_version = "3.13",
29+
requirements_lock = "//:requirements_lock.txt",
30+
)
31+
32+
use_repo(pip, "pypi")
33+
34+
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
35+
git_override(
36+
module_name = "hedron_compile_commands",
37+
remote = "https://github.com/hedronvision/bazel-compile-commands-extractor.git",
38+
commit = "0e990032f3c5a866e72615cf67e5ce22186dcb97",
39+
# Replace the commit hash (above) with the latest (https://github.com/hedronvision/bazel-compile-commands-extractor/commits/main).
40+
# Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README).
41+
)

MODULE.bazel.lock

Lines changed: 51 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)