-
Notifications
You must be signed in to change notification settings - Fork 5
/
MODULE.bazel
36 lines (30 loc) · 1.04 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"rules_mypy"
module(
name = "rules_mypy",
version = "0.0.0",
)
bazel_dep(name = "bazel_skylib", version = "1.4.1")
bazel_dep(name = "buildifier_prebuilt", version = "7.3.1")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "rules_python", version = "0.34.0")
bazel_dep(name = "rules_uv", version = "0.21.0")
# configuration
PYTHON_VERSION = "3.12"
PYTHON_VERSION_SNAKE = PYTHON_VERSION.replace(".", "_")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = PYTHON_VERSION,
)
use_repo(python, "python_" + PYTHON_VERSION_SNAKE, "python_versions")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
enable_implicit_namespace_pkgs = True,
experimental_index_url = "https://pypi.org/simple", # use Bazel downloader
hub_name = "rules_mypy_pip",
python_version = PYTHON_VERSION,
requirements_by_platform = {
"//mypy/private:requirements.txt": "*",
},
)
use_repo(pip, "rules_mypy_pip")