• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//python:defs.bzl", "py_binary", "py_library", "py_test")
2load("//python/pip_install:repositories.bzl", "requirement")
3
4py_library(
5    name = "lib",
6    srcs = [
7        "arguments.py",
8        "namespace_pkgs.py",
9        "wheel.py",
10        "wheel_installer.py",
11    ],
12    deps = [
13        requirement("installer"),
14        requirement("pip"),
15        requirement("setuptools"),
16    ],
17)
18
19py_binary(
20    name = "wheel_installer",
21    srcs = [
22        "wheel_installer.py",
23    ],
24    deps = [":lib"],
25)
26
27py_test(
28    name = "arguments_test",
29    size = "small",
30    srcs = [
31        "arguments_test.py",
32    ],
33    deps = [
34        ":lib",
35    ],
36)
37
38py_test(
39    name = "namespace_pkgs_test",
40    size = "small",
41    srcs = [
42        "namespace_pkgs_test.py",
43    ],
44    deps = [
45        ":lib",
46    ],
47)
48
49py_test(
50    name = "wheel_installer_test",
51    size = "small",
52    srcs = [
53        "wheel_installer_test.py",
54    ],
55    data = ["//examples/wheel:minimal_with_py_package"],
56    deps = [
57        ":lib",
58    ],
59)
60
61filegroup(
62    name = "distribution",
63    srcs = glob(
64        ["*"],
65        exclude = ["*_test.py"],
66    ),
67    visibility = ["//python/pip_install:__subpackages__"],
68)
69
70filegroup(
71    name = "py_srcs",
72    srcs = glob(
73        include = ["**/*.py"],
74        exclude = ["**/*_test.py"],
75    ),
76    visibility = ["//python/pip_install:__subpackages__"],
77)
78