Skip to content

Commit 72ac64a

Browse files
authored
Refactor wheel_installer (bazel-contrib#937)
* . * . * . * . * . * .
1 parent 8331522 commit 72ac64a

File tree

14 files changed

+618
-665
lines changed

14 files changed

+618
-665
lines changed

examples/wheel/wheel_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ def test_customized_wheel(self):
109109
examples/wheel/lib/module_with_data.py,sha256=8s0Khhcqz3yVsBKv2IB5u4l4TMKh7-c_V6p65WVHPms,637
110110
examples/wheel/lib/simple_module.py,sha256=z2hwciab_XPNIBNH8B1Q5fYgnJvQTeYf0ZQJpY8yLLY,637
111111
examples/wheel/main.py,sha256=sgg5iWN_9inYBjm6_Zw27hYdmo-l24fA-2rfphT-IlY,909
112-
""")
112+
""",
113+
)
113114
self.assertEqual(
114115
wheel_contents,
115116
b"""\
@@ -134,7 +135,8 @@ def test_customized_wheel(self):
134135
Requires-Dist: pytest
135136
136137
This is a sample description of a wheel.
137-
""")
138+
""",
139+
)
138140
self.assertEqual(
139141
entry_point_contents,
140142
b"""\

python/pip_install/extract_wheels/BUILD

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,10 @@ py_library(
88
"annotation.py",
99
"arguments.py",
1010
"bazel.py",
11-
"extract_single_wheel.py",
1211
"namespace_pkgs.py",
1312
"parse_requirements_to_bzl.py",
14-
"requirements.py",
1513
"wheel.py",
14+
"wheel_installer.py",
1615
],
1716
deps = [
1817
requirement("installer"),
@@ -21,9 +20,9 @@ py_library(
2120
)
2221

2322
py_binary(
24-
name = "extract_single_wheel",
23+
name = "wheel_installer",
2524
srcs = [
26-
"extract_single_wheel.py",
25+
"wheel_installer.py",
2726
],
2827
deps = [":lib"],
2928
)
@@ -78,18 +77,6 @@ py_test(
7877
],
7978
)
8079

81-
py_test(
82-
name = "bazel_test",
83-
size = "small",
84-
srcs = [
85-
"bazel_test.py",
86-
],
87-
tags = ["unit"],
88-
deps = [
89-
":lib",
90-
],
91-
)
92-
9380
py_test(
9481
name = "namespace_pkgs_test",
9582
size = "small",
@@ -103,11 +90,12 @@ py_test(
10390
)
10491

10592
py_test(
106-
name = "requirements_test",
93+
name = "wheel_installer_test",
10794
size = "small",
10895
srcs = [
109-
"requirements_test.py",
96+
"wheel_installer_test.py",
11097
],
98+
data = ["//examples/wheel:minimal_with_py_package"],
11199
tags = ["unit"],
112100
deps = [
113101
":lib",
@@ -126,16 +114,6 @@ py_test(
126114
],
127115
)
128116

129-
py_test(
130-
name = "whl_filegroup_test",
131-
size = "small",
132-
srcs = ["whl_filegroup_test.py"],
133-
data = ["//examples/wheel:minimal_with_py_package"],
134-
main = "whl_filegroup_test.py",
135-
tags = ["unit"],
136-
deps = [":lib"],
137-
)
138-
139117
py_test(
140118
name = "parse_requirements_to_bzl_test",
141119
size = "small",

0 commit comments

Comments
 (0)