Files
codeql/python/extractor/tsg-python/tree-sitter-python/BUILD.bazel
Taus 6f388acdd8 Python: Rename tsg_python_crate_index to py_deps
This aligns us a bit more with Ruby.
2024-03-19 17:11:40 +00:00

39 lines
892 B
Python

load("@rules_rust//cargo:defs.bzl", "cargo_build_script")
load("@rules_rust//rust:defs.bzl", "rust_library")
load("@py_deps//:defs.bzl", "aliases", "all_crate_deps")
package(default_visibility = ["//visibility:public"])
# This will run the build script from the root of the workspace, and
# collect the outputs.
cargo_build_script(
name = "tsg-build-script",
srcs = ["bindings/rust/build.rs"],
data = glob([
"src/**",
]),
deps = all_crate_deps(
build = True,
),
)
rust_library(
name = "tree-sitter-python",
srcs = [
"bindings/rust/lib.rs",
],
aliases = aliases(),
compile_data = glob([
"src/**",
"queries/**",
]) + [
"grammar.js",
],
proc_macro_deps = all_crate_deps(
proc_macro = True,
),
deps = [":tsg-build-script"] + all_crate_deps(
normal = True,
),
)