pytorch/torchgen/build.bzl
mikey dagitses 9bbee245fe update rules_python and let bazel install its own pip dependencies (#101405)
update rules_python and let bazel install its own pip dependencies

Summary:
This is the official way of doing Python in Bazel.

Test Plan: Rely on CI.

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/pytorch/pytorch/pull/101405).
* #101406
* __->__ #101405
Pull Request resolved: https://github.com/pytorch/pytorch/pull/101405
Approved by: https://github.com/vors, https://github.com/huydhn
2023-05-23 06:20:33 +00:00

31 lines
794 B
Python

def define_targets(rules):
rules.py_library(
name = "torchgen",
srcs = rules.glob(["**/*.py"]),
visibility = ["//visibility:public"],
deps = [
rules.requirement("PyYAML"),
rules.requirement("typing-extensions"),
],
)
rules.py_binary(
name = "gen",
srcs = [":torchgen"],
visibility = ["//visibility:public"],
deps = [
rules.requirement("PyYAML"),
rules.requirement("typing-extensions"),
],
)
rules.py_binary(
name = "gen_executorch",
srcs = [":torchgen"],
visibility = ["//visibility:public"],
deps = [
rules.requirement("PyYAML"),
rules.requirement("typing-extensions"),
],
)