mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 00:20:18 +01:00
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
31 lines
794 B
Python
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"),
|
|
],
|
|
)
|