forked from bazel-contrib/rules_python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMODULE.bazel
37 lines (32 loc) · 1019 Bytes
/
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
37
module(
name = "platform_specific_deps",
version = "0.0.0",
compatibility_level = 1,
)
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "rules_python", version = "0.0.0")
# TODO: Replace with builtin uv support if it supports platform specific requirements output
bazel_dep(name = "rules_uv", version = "0.56.0")
local_path_override(
module_name = "rules_python",
path = "../..",
)
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
python_version = "3.12",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
experimental_index_url = "https://pypi.org/simple", # use Bazel downloader
experimental_target_platforms = [
"linux_x86_64",
"linux_aarch64",
"osx_aarch64",
],
hub_name = "pip",
python_version = "3.12",
requirements_by_platform = {
"requirements.txt": "osx_aarch64,linux_aarch64,linux_x86_64",
},
)
use_repo(pip, "pip")