-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMODULE.bazel
More file actions
87 lines (75 loc) · 2.34 KB
/
Copy pathMODULE.bazel
File metadata and controls
87 lines (75 loc) · 2.34 KB
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
82
83
84
85
86
87
""" Bazel module definition for rules_freecad """
module(
name = "rules_freecad",
version = "0.0.1",
compatibility_level = 1,
)
bazel_dep(
name = "rules_python",
version = "1.6.3",
)
bazel_dep(
name = "platforms",
version = "1.0.0",
)
python = use_extension(
"@rules_python//python/extensions:python.bzl",
"python",
)
python.toolchain(
is_default = False,
python_version = "3.11",
)
use_repo(python, "python_3_11", "python_versions", "pythons_hub")
pip = use_extension(
"@rules_python//python/extensions:pip.bzl",
"pip",
)
pip.parse(
hub_name = "pypi",
python_version = "3.11",
requirements_lock = "//:requirements.txt", # Or requirements.txt if you want Bazel to generate the lock file
)
use_repo(pip, "pypi")
http_file = use_repo_rule(
"@bazel_tools//tools/build_defs/repo:http.bzl",
"http_file",
)
http_archive = use_repo_rule(
"@bazel_tools//tools/build_defs/repo:http.bzl",
"http_archive",
)
http_file(
name = "freecad_linux_x86_64",
downloaded_file_path = "freecad.AppImage",
executable = True,
sha256 = "e00be00ad9fdb12b05c5002bfd1aa2ea8126f2c1d4e2fb603eb7423b72904f61",
url = "https://github.com/FreeCAD/FreeCAD/releases/download/1.0.2/FreeCAD_1.0.2-conda-Linux-x86_64-py311.AppImage",
)
http_file(
name = "freecad_macos_arm64",
downloaded_file_path = "freecad.dmg",
sha256 = "2fde16da356b62cfce656cd12effaa79f97f2f28a71f1520dd90fabb88f9d3fd",
url = "https://github.com/FreeCAD/FreeCAD/releases/download/1.0.2/FreeCAD_1.0.2-conda-macOS-arm64-py311.dmg",
)
http_archive(
name = "7zip_linux_x86_64",
build_file = "//third_party:BUILD.7zz.bazel",
sha256 = "9b3a2edf0644a2b00b0a39ab6843f426128e4a6f6f98c40f8c02a668e5b5b59b",
url = "https://7-zip.org/a/7z2408-linux-x64.tar.xz",
)
http_archive(
name = "7zip_macos",
build_file = "//third_party:BUILD.7zz.bazel",
sha256 = "4d87dae186279ff717749abae3c75dc6f29ce5aea370aa42db4b8083299a9055",
url = "https://7-zip.org/a/7z2408-mac.tar.xz",
)
custom_python_extension = use_extension(
"//tools:extensions.bzl",
"custom_python_extension",
)
use_repo(custom_python_extension, "python_interpreter_linux_x86_64", "python_interpreter_macos_arm64")
register_toolchains(
"@python_interpreter_linux_x86_64//:freecad_toolchain",
"@python_interpreter_macos_arm64//:freecad_toolchain",
)