generated from bazel-contrib/rules-template
-
Notifications
You must be signed in to change notification settings - Fork 25
/
WORKSPACE
81 lines (66 loc) · 1.93 KB
/
WORKSPACE
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
workspace(
name = "rules_pycross_example",
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_python",
sha256 = "d71d2c67e0bce986e1c5a7731b4693226867c45bfe0b7c5e0067228a536fc580",
strip_prefix = "rules_python-0.29.0",
url = "https://github.com/bazelbuild/rules_python/releases/download/0.29.0/rules_python-0.29.0.tar.gz",
)
load("@rules_python//python:repositories.bzl", "py_repositories", "python_register_multi_toolchains")
py_repositories()
python_register_multi_toolchains(
name = "python",
default_version = "3.12",
python_versions = [
"3.10",
"3.11",
"3.12",
],
)
load("@python//3.12:defs.bzl", python_interpreter = "interpreter")
local_repository(
name = "rules_pycross",
path = "../..",
)
load("@rules_pycross//pycross:repositories.bzl", "rules_pycross_dependencies")
rules_pycross_dependencies(
python_interpreter_target = python_interpreter,
)
load(
"@rules_pycross//pycross:workspace.bzl",
"lock_repo_model_pdm",
"pycross_lock_repo",
"pycross_register_for_python_toolchains",
)
pycross_register_for_python_toolchains(
name = "pycross_toolchains",
python_toolchains_repo = "@python",
)
load("@pycross_toolchains//:defs.bzl", "environments")
load("@rules_pycross//pycross:defs.bzl", "package_annotation")
pycross_lock_repo(
name = "pdm",
annotations = {
"amqp-mock": package_annotation(
install_exclude_globs = [
"tests/**",
],
),
"grpclib": package_annotation(
always_build = True,
build_dependencies = [
"setuptools",
"wheel",
],
),
},
lock_model = lock_repo_model_pdm(
lock_file = "@//:pdm.lock",
project_file = "@//:pyproject.toml",
),
target_environments = environments,
)
load("@pdm//:defs.bzl", "install_deps")
install_deps()