Debian Codegraph @

python/BUILD

raw
1 load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
2 load("@rules_python//python:defs.bzl", "py_library", "py_test")
3
4 package(default_visibility = ["//visibility:private"])
5
6 cc_binary(
7 name = "_jsonnet.so",
8 srcs = ["_jsonnet.c"],
9 linkshared = 1,
10 deps = [
11 "//core:libjsonnet",
12 "@rules_python//python/cc:current_py_cc_headers",
13 ],
14 )
15
16 py_library(
17 name = "_jsonnet",
18 data = [":_jsonnet.so"],
19 imports = ["."],
20 srcs_version = "PY3",
21 visibility = ["//visibility:public"],
22 )
23
24 py_test(
25 name = "_jsonnet_test",
26 size = "small",
27 srcs = ["_jsonnet_test.py"],
28 data = [
29 "testdata/basic_check.jsonnet",
30 "testdata/binary123.bin",
31 "testdata/binary1230123.bin",
32 "testdata/trivial.jsonnet",
33 "testdata/trivial_no_eol.jsonnet",
34 ],
35 python_version = "PY3",
36 deps = [":_jsonnet"],
37 )