diff options
author | Vinh Tran <vinhdaitran@google.com> | 2023-07-24 13:52:04 -0400 |
---|---|---|
committer | Vinh Tran <vinhdaitran@google.com> | 2023-07-24 13:57:03 -0400 |
commit | b14b3520de9a1d6e38eb6cd63749ef78c28946c2 (patch) | |
tree | acdcc148cabfb6f8242a6c83e37625eeaea4e628 /MODULE.bazel | |
parent | 62c90a8ca6aa21d4e60cfe32b3784609d80480f6 (diff) | |
parent | bb7004b1c8e79220ad0212dbc131e11a06aecf6c (diff) | |
download | bazelbuild-rules_python-platform-tools-34.0.5.tar.gz |
Merge remote-tracking branch 'aosp/upstream-main' into mainplatform-tools-34.0.5main-16k
Add three more files
- METADATA
- MODULE_LICENSE_APACHE2
- OWNERS
Test: N/A
Bug: 290219820
Change-Id: Ic4dccf130d29e6963332b212d8aa071b24629f58
Diffstat (limited to 'MODULE.bazel')
-rw-r--r-- | MODULE.bazel | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..b7a0411 --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,49 @@ +module( + name = "rules_python", + version = "0.0.0", + compatibility_level = 1, +) + +bazel_dep(name = "platforms", version = "0.0.4") +bazel_dep(name = "bazel_skylib", version = "1.3.0") + +# Those are loaded only when using py_proto_library +bazel_dep(name = "rules_proto", version = "5.3.0-21.7") +bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") + +internal_deps = use_extension("@rules_python//python/extensions/private:internal_deps.bzl", "internal_deps") +internal_deps.install() +use_repo( + internal_deps, + "pypi__build", + "pypi__click", + "pypi__colorama", + "pypi__importlib_metadata", + "pypi__installer", + "pypi__more_itertools", + "pypi__packaging", + "pypi__pep517", + "pypi__pip", + "pypi__pip_tools", + "pypi__setuptools", + "pypi__tomli", + "pypi__wheel", + "pypi__zipp", +) + +# We need to do another use_extension call to expose the "pythons_hub" +# repo. +python = use_extension("@rules_python//python/extensions:python.bzl", "python") + +# The default toolchain to use if nobody configures a toolchain. +# NOTE: This is not a stable version. It is provided for convenience, but will +# change frequently to track the most recent Python version. +# NOTE: The root module can override this. +python.toolchain( + is_default = True, + python_version = "3.11", +) +use_repo(python, "pythons_hub") + +# This call registers the Python toolchains. +register_toolchains("@pythons_hub//:all") |