@@ -15,8 +15,8 @@ package(default_visibility = ["//visibility:public"])
1515
1616licenses (["notice" ]) # Apache 2.0
1717
18- load ("//python:defs.bzl" , "py_library" , "py_test" )
1918load ("//experimental/python:wheel.bzl" , "py_package" , "py_wheel" )
19+ load ("//python:defs.bzl" , "py_library" , "py_test" )
2020
2121py_library (
2222 name = "main" ,
@@ -91,54 +91,54 @@ py_wheel(
9191 # Package data. We're building "custom_package_root-0.0.1-py3-none-any.whl"
9292 distribution = "example_custom_package_root" ,
9393 python_tag = "py3" ,
94+ strip_path_prefixes = [
95+ "experimental" ,
96+ ],
9497 version = "0.0.1" ,
9598 deps = [
96- ":example_pkg"
99+ ":example_pkg" ,
97100 ],
98- strip_path_prefixes = [
99- "experimental"
100- ]
101101)
102102
103103py_wheel (
104104 name = "custom_package_root_multi_prefix" ,
105105 # Package data. We're building "custom_custom_package_root_multi_prefix-0.0.1-py3-none-any.whl"
106106 distribution = "example_custom_package_root_multi_prefix" ,
107107 python_tag = "py3" ,
108+ strip_path_prefixes = [
109+ "experimental/examples/wheel/lib" ,
110+ "experimental/examples/wheel" ,
111+ ],
108112 version = "0.0.1" ,
109113 deps = [
110- ":example_pkg"
114+ ":example_pkg" ,
111115 ],
112- strip_path_prefixes = [
113- "experimental/examples/wheel/lib" ,
114- "experimental/examples/wheel"
115- ]
116116)
117117
118118py_wheel (
119119 name = "custom_package_root_multi_prefix_reverse_order" ,
120120 # Package data. We're building "custom_custom_package_root_multi_prefix_reverse_order-0.0.1-py3-none-any.whl"
121121 distribution = "example_custom_package_root_multi_prefix_reverse_order" ,
122122 python_tag = "py3" ,
123+ strip_path_prefixes = [
124+ "experimental/examples/wheel" ,
125+ "experimental/examples/wheel/lib" , # this is not effective, because the first prefix takes priority
126+ ],
123127 version = "0.0.1" ,
124128 deps = [
125- ":example_pkg"
129+ ":example_pkg" ,
126130 ],
127- strip_path_prefixes = [
128- "experimental/examples/wheel" ,
129- "experimental/examples/wheel/lib" # this is not effective, because the first prefix takes priority
130- ]
131131)
132132
133133py_test (
134134 name = "wheel_test" ,
135135 srcs = ["wheel_test.py" ],
136136 data = [
137+ ":custom_package_root" ,
138+ ":custom_package_root_multi_prefix" ,
139+ ":custom_package_root_multi_prefix_reverse_order" ,
137140 ":customized" ,
138141 ":minimal_with_py_library" ,
139142 ":minimal_with_py_package" ,
140- ":custom_package_root" ,
141- ":custom_package_root_multi_prefix" ,
142- ":custom_package_root_multi_prefix_reverse_order"
143- ]
143+ ],
144144)
0 commit comments