• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("@rules_python//python:defs.bzl", "py_binary", "py_library", "py_test")
2
3# gazelle:python_generation_mode file
4
5py_library(
6    name = "__init__",
7    srcs = ["__init__.py"],
8    visibility = ["//:__subpackages__"],
9    deps = [
10        ":module1",
11        ":module2",
12        "//foo/bar:baz",
13        "//hello:world",
14        "@gazelle_python_test//foo",
15        "@star_wars//rebel_alliance/luke:skywalker",
16    ],
17)
18
19py_library(
20    name = "module1",
21    srcs = ["module1.py"],
22    visibility = ["//:__subpackages__"],
23)
24
25py_library(
26    name = "module2",
27    srcs = ["module2.py"],
28    visibility = ["//:__subpackages__"],
29    deps = [
30        "//checking/py_binary/from/if:works",
31        "//foo:bar",
32    ],
33)
34
35py_binary(
36    name = "annotation_include_dep_bin",
37    srcs = ["__main__.py"],
38    main = "__main__.py",
39    visibility = ["//:__subpackages__"],
40    deps = [
41        ":module2",
42        "//checking/py_binary/from/__main__:works",
43    ],
44)
45
46py_test(
47    name = "module2_test",
48    srcs = ["module2_test.py"],
49    deps = [
50        ":module2",
51        "//checking/py_test/works:too",
52    ],
53)
54