MODULE.bazel 1.0 KB

123456789101112131415161718192021222324252627282930
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. """Bazel modules.
  5. This is set up as a separate bazel repo from the main Carbon directory in order
  6. to split up the pip dependency, which makes MODULE.bazel.lock
  7. platform-dependent. We don't commit the MODULE.bazel.lock for github_tools
  8. because it's low-value, and would shift the platform dependence costs.
  9. """
  10. module(name = "github_tools")
  11. bazel_dep(name = "rules_python", version = "0.27.1")
  12. python = use_extension("@rules_python//python/extensions:python.bzl", "python")
  13. python.toolchain(
  14. python_version = "3.11",
  15. )
  16. use_repo(python, "python_versions")
  17. # Create a central repo that knows about the pip dependencies.
  18. pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
  19. pip.parse(
  20. hub_name = "py_deps",
  21. python_version = "3.11",
  22. requirements_lock = "//:requirements.txt",
  23. )
  24. use_repo(pip, "py_deps")