-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMODULE.bazel
More file actions
133 lines (119 loc) · 3.89 KB
/
MODULE.bazel
File metadata and controls
133 lines (119 loc) · 3.89 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
module(name = "cpp-dataflow-distributed-engine")
bazel_dep(name = "rules_cc", version = "0.2.17")
bazel_dep(name = "rules_python", version = "1.7.0")
local_python_configure = use_repo_rule("//tools:python_configure.bzl", "local_python_configure")
local_python_configure(name = "velaria_local_python")
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "nanoarrow_src",
build_file_content = """load("@rules_cc//cc:defs.bzl", "cc_library")
genrule(
name = "nanoarrow_config_header",
srcs = ["src/nanoarrow/nanoarrow_config.h.in"],
outs = ["src/nanoarrow/nanoarrow_config.h"],
cmd = ("sed " +
"-e 's/@NANOARROW_VERSION_MAJOR@/0/g' " +
"-e 's/@NANOARROW_VERSION_MINOR@/8/g' " +
"-e 's/@NANOARROW_VERSION_PATCH@/0/g' " +
"-e 's/@NANOARROW_VERSION@/0.8.0/g' " +
"-e 's/@NANOARROW_NAMESPACE_DEFINE@//g' " +
"$< >$@"),
)
cc_library(
name = "nanoarrow",
srcs = [
"src/nanoarrow/common/array.c",
"src/nanoarrow/common/array_stream.c",
"src/nanoarrow/common/schema.c",
"src/nanoarrow/common/utils.c",
"src/nanoarrow/ipc/codecs.c",
"src/nanoarrow/ipc/decoder.c",
"src/nanoarrow/ipc/encoder.c",
"src/nanoarrow/ipc/reader.c",
"src/nanoarrow/ipc/writer.c",
"thirdparty/flatcc/src/runtime/builder.c",
"thirdparty/flatcc/src/runtime/emitter.c",
"thirdparty/flatcc/src/runtime/refmap.c",
"thirdparty/flatcc/src/runtime/verifier.c",
],
hdrs = glob([
"src/nanoarrow/**/*.h",
"thirdparty/flatcc/include/**/*.h",
]) + [":nanoarrow_config_header"],
includes = [
"src",
"thirdparty/flatcc/include",
],
linkstatic = True,
visibility = ["//visibility:public"],
)
""",
sha256 = "1c5136edf5c1e9cd8c47c4e31dfe07d0e09c25f27be20c8d6e78a0f4a4ed3fae",
strip_prefix = "arrow-nanoarrow-apache-arrow-nanoarrow-0.8.0",
type = "tar.gz",
urls = [
"https://codeload.github.com/apache/arrow-nanoarrow/tar.gz/refs/tags/apache-arrow-nanoarrow-0.8.0",
],
)
http_archive(
name = "cppjieba_src",
build_file_content = """load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "cppjieba",
hdrs = glob([
"include/cppjieba/**/*.hpp",
"dict/**",
]),
includes = ["include"],
deps = ["@limonp_src//:limonp"],
linkstatic = True,
visibility = ["//visibility:public"],
)
filegroup(
name = "dict_files",
srcs = glob(["dict/**"]),
visibility = ["//visibility:public"],
)
exports_files([
"dict/jieba.dict.utf8",
"dict/hmm_model.utf8",
"dict/user.dict.utf8",
"dict/idf.utf8",
"dict/stop_words.utf8",
], visibility = ["//visibility:public"])
""",
sha256 = "2f58f88608a5521b47057cc5d46a79c93283c619d81d3d8956c33b8e9cdd84fb",
strip_prefix = "cppjieba-5.6.3",
type = "tar.gz",
urls = [
"https://codeload.github.com/yanyiwu/cppjieba/tar.gz/refs/tags/v5.6.3",
],
)
http_archive(
name = "limonp_src",
build_file_content = """load("@rules_cc//cc:defs.bzl", "cc_library")
cc_library(
name = "limonp",
hdrs = glob(["include/limonp/**/*.hpp"]),
includes = ["include"],
linkstatic = True,
visibility = ["//visibility:public"],
)
""",
sha256 = "0d98bd9c87bd82bcfc234107908969e7416145d8b5e996e43c5d2513c419b2c0",
strip_prefix = "limonp-1.0.2",
type = "tar.gz",
urls = [
"https://codeload.github.com/yanyiwu/limonp/tar.gz/refs/tags/v1.0.2",
],
)
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = "3.12")
use_repo(python, "python_3_12")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "pypi",
python_version = "3.12",
requirements_lock = "//python:requirements.lock",
)
use_repo(pip, "pypi")