1module( 2 name = "rules_python", 3 version = "0.0.0", 4 compatibility_level = 1, 5) 6 7bazel_dep(name = "platforms", version = "0.0.4") 8bazel_dep(name = "bazel_skylib", version = "1.3.0") 9 10# Those are loaded only when using py_proto_library 11bazel_dep(name = "rules_proto", version = "5.3.0-21.7") 12bazel_dep(name = "protobuf", version = "21.7", repo_name = "com_google_protobuf") 13 14internal_deps = use_extension("@rules_python//python/extensions/private:internal_deps.bzl", "internal_deps") 15internal_deps.install() 16use_repo( 17 internal_deps, 18 # START: maintained by 'bazel run //tools/private:update_pip_deps' 19 "pypi__build", 20 "pypi__click", 21 "pypi__colorama", 22 "pypi__importlib_metadata", 23 "pypi__installer", 24 "pypi__more_itertools", 25 "pypi__packaging", 26 "pypi__pep517", 27 "pypi__pip", 28 "pypi__pip_tools", 29 "pypi__setuptools", 30 "pypi__tomli", 31 "pypi__wheel", 32 "pypi__zipp", 33 # END: maintained by 'bazel run //tools/private:update_pip_deps' 34) 35 36# We need to do another use_extension call to expose the "pythons_hub" 37# repo. 38python = use_extension("@rules_python//python/extensions:python.bzl", "python") 39 40# The default toolchain to use if nobody configures a toolchain. 41# NOTE: This is not a stable version. It is provided for convenience, but will 42# change frequently to track the most recent Python version. 43# NOTE: The root module can override this. 44python.toolchain( 45 is_default = True, 46 python_version = "3.11", 47) 48use_repo(python, "pythons_hub") 49 50# This call registers the Python toolchains. 51register_toolchains("@pythons_hub//:all") 52