|
1 | 1 | # This file existed originally to enable quick local development via local_repository.
|
2 |
| - # See ./ImplementationReadme.md for details on local development. |
3 |
| - # Why? local_repository didn't work without a WORKSPACE, and new_local_repository required overwriting the BUILD file (as of Bazel 5.0). |
| 2 | +# See ./ImplementationReadme.md for details on local development. |
| 3 | +# Why? local_repository didn't work without a WORKSPACE, and new_local_repository required overwriting the BUILD file (as of Bazel 5.0). |
4 | 4 |
|
5 | 5 | workspace(name = "hedron_compile_commands")
|
6 | 6 |
|
| 7 | +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 8 | + |
| 9 | +# TODO(cpsauer): move everything above hedron_compile_commands_setup() into setup macros. |
| 10 | +BAZEL_SKYLIB_VERSION = "1.4.2" |
| 11 | + |
| 12 | +http_archive( |
| 13 | + name = "bazel_skylib", |
| 14 | + sha256 = "66ffd9315665bfaafc96b52278f57c7e2dd09f5ede279ea6d39b2be471e7e3aa", |
| 15 | + urls = [ |
| 16 | + "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{0}/bazel-skylib-{0}.tar.gz".format(BAZEL_SKYLIB_VERSION), |
| 17 | + "https://github.com/bazelbuild/bazel-skylib/releases/download/{0}/bazel-skylib-{0}.tar.gz".format(BAZEL_SKYLIB_VERSION), |
| 18 | + ], |
| 19 | +) |
| 20 | + |
| 21 | +http_archive( |
| 22 | + name = "rules_python", |
| 23 | + sha256 = "84aec9e21cc56fbc7f1335035a71c850d1b9b5cc6ff497306f84cced9a769841", |
| 24 | + strip_prefix = "rules_python-0.23.1", |
| 25 | + url = "https://github.com/bazelbuild/rules_python/releases/download/0.23.1/rules_python-0.23.1.tar.gz", |
| 26 | +) |
| 27 | + |
| 28 | +load("@rules_python//python:repositories.bzl", "python_register_toolchains") |
| 29 | + |
| 30 | +python_register_toolchains( |
| 31 | + name = "python_toolchain", |
| 32 | + python_version = "3.11", |
| 33 | +) |
| 34 | + |
| 35 | +# For re-generating python_requirements_lock.bzl: |
| 36 | +# * update python_requirements_lock.txt |
| 37 | +# * Un-comment the below |
| 38 | +# * run `bazel build @pip//...`, |
| 39 | +# * cp external/pip/requirements.bzl python_requirements_lock.bzl |
| 40 | + |
| 41 | +# load("@python_toolchain//:defs.bzl", "interpreter") |
| 42 | +# load("@rules_python//python:pip.bzl", "pip_parse") |
| 43 | +# pip_parse( |
| 44 | +# name = "pip", |
| 45 | +# python_interpreter_target = interpreter, |
| 46 | +# requirements_lock = "//:python_requirements_lock.txt", |
| 47 | +# ) |
| 48 | + |
7 | 49 | load("@hedron_compile_commands//:workspace_setup.bzl", "hedron_compile_commands_setup")
|
| 50 | + |
8 | 51 | hedron_compile_commands_setup()
|
0 commit comments