Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 1 | package bp2build |
| 2 | |
| 3 | import ( |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | dc212c0 | 2021-08-23 20:21:19 +0000 | [diff] [blame] | 4 | "fmt" |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 5 | "strings" |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 6 | "testing" |
| 7 | |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | dc212c0 | 2021-08-23 20:21:19 +0000 | [diff] [blame] | 8 | "android/soong/android" |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 9 | "android/soong/python" |
| 10 | ) |
| 11 | |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | dc212c0 | 2021-08-23 20:21:19 +0000 | [diff] [blame] | 12 | // TODO(alexmarquez): Should be lifted into a generic Bp2Build file |
| 13 | type PythonLibBp2Build func(ctx android.TopDownMutatorContext) |
| 14 | |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 15 | type pythonLibBp2BuildTestCase struct { |
| 16 | description string |
| 17 | filesystem map[string]string |
| 18 | blueprint string |
| 19 | expectedBazelTargets []testBazelTarget |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 20 | dir string |
| 21 | expectedError error |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 22 | } |
| 23 | |
| 24 | func convertPythonLibTestCaseToBp2build_Host(tc pythonLibBp2BuildTestCase) bp2buildTestCase { |
| 25 | for i := range tc.expectedBazelTargets { |
| 26 | tc.expectedBazelTargets[i].attrs["target_compatible_with"] = `select({ |
| 27 | "//build/bazel/platforms/os:android": ["@platforms//:incompatible"], |
| 28 | "//conditions:default": [], |
| 29 | })` |
| 30 | } |
| 31 | |
| 32 | return convertPythonLibTestCaseToBp2build(tc) |
| 33 | } |
| 34 | |
| 35 | func convertPythonLibTestCaseToBp2build(tc pythonLibBp2BuildTestCase) bp2buildTestCase { |
| 36 | var bp2BuildTargets []string |
| 37 | for _, t := range tc.expectedBazelTargets { |
| 38 | bp2BuildTargets = append(bp2BuildTargets, makeBazelTarget(t.typ, t.name, t.attrs)) |
| 39 | } |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 40 | // Copy the filesystem so that we can change stuff in it later without it |
| 41 | // affecting the original pythonLibBp2BuildTestCase |
| 42 | filesystemCopy := make(map[string]string) |
| 43 | for k, v := range tc.filesystem { |
| 44 | filesystemCopy[k] = v |
| 45 | } |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 46 | return bp2buildTestCase{ |
| 47 | description: tc.description, |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 48 | filesystem: filesystemCopy, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 49 | blueprint: tc.blueprint, |
| 50 | expectedBazelTargets: bp2BuildTargets, |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 51 | dir: tc.dir, |
| 52 | expectedErr: tc.expectedError, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 53 | } |
| 54 | } |
| 55 | |
| 56 | func runPythonLibraryTestCase(t *testing.T, tc pythonLibBp2BuildTestCase) { |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | dc212c0 | 2021-08-23 20:21:19 +0000 | [diff] [blame] | 57 | t.Helper() |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 58 | testCase := convertPythonLibTestCaseToBp2build(tc) |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 59 | testCase.description = fmt.Sprintf(testCase.description, "python_library") |
| 60 | testCase.blueprint = fmt.Sprintf(testCase.blueprint, "python_library") |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 61 | for name, contents := range testCase.filesystem { |
| 62 | if strings.HasSuffix(name, "Android.bp") { |
| 63 | testCase.filesystem[name] = fmt.Sprintf(contents, "python_library") |
| 64 | } |
| 65 | } |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 66 | testCase.moduleTypeUnderTest = "python_library" |
| 67 | testCase.moduleTypeUnderTestFactory = python.PythonLibraryFactory |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 68 | |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 69 | runBp2BuildTestCaseSimple(t, testCase) |
| 70 | } |
| 71 | |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 72 | func runPythonLibraryHostTestCase(t *testing.T, tc pythonLibBp2BuildTestCase) { |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 73 | t.Helper() |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 74 | testCase := convertPythonLibTestCaseToBp2build_Host(tc) |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 75 | testCase.description = fmt.Sprintf(testCase.description, "python_library_host") |
| 76 | testCase.blueprint = fmt.Sprintf(testCase.blueprint, "python_library_host") |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 77 | for name, contents := range testCase.filesystem { |
| 78 | if strings.HasSuffix(name, "Android.bp") { |
| 79 | testCase.filesystem[name] = fmt.Sprintf(contents, "python_library_host") |
| 80 | } |
| 81 | } |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 82 | testCase.moduleTypeUnderTest = "python_library_host" |
| 83 | testCase.moduleTypeUnderTestFactory = python.PythonLibraryHostFactory |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 84 | runBp2BuildTestCase(t, func(ctx android.RegistrationContext) { |
| 85 | ctx.RegisterModuleType("python_library", python.PythonLibraryFactory) |
| 86 | }, |
| 87 | testCase) |
| 88 | } |
| 89 | |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 90 | func runPythonLibraryTestCases(t *testing.T, tc pythonLibBp2BuildTestCase) { |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 91 | t.Helper() |
| 92 | runPythonLibraryTestCase(t, tc) |
| 93 | runPythonLibraryHostTestCase(t, tc) |
| 94 | } |
| 95 | |
| 96 | func TestSimplePythonLib(t *testing.T) { |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 97 | testCases := []pythonLibBp2BuildTestCase{ |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 98 | { |
| 99 | description: "simple %s converts to a native py_library", |
| 100 | filesystem: map[string]string{ |
| 101 | "a.py": "", |
| 102 | "b/c.py": "", |
| 103 | "b/d.py": "", |
| 104 | "b/e.py": "", |
| 105 | "files/data.txt": "", |
| 106 | }, |
| 107 | blueprint: `%s { |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 108 | name: "foo", |
| 109 | srcs: ["**/*.py"], |
| 110 | exclude_srcs: ["b/e.py"], |
| 111 | data: ["files/data.txt",], |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 560cb66 | 2021-08-26 20:13:29 +0000 | [diff] [blame] | 112 | libs: ["bar"], |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 113 | bazel_module: { bp2build_available: true }, |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 560cb66 | 2021-08-26 20:13:29 +0000 | [diff] [blame] | 114 | } |
| 115 | python_library { |
| 116 | name: "bar", |
| 117 | srcs: ["b/e.py"], |
| 118 | bazel_module: { bp2build_available: false }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 119 | }`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 120 | expectedBazelTargets: []testBazelTarget{ |
| 121 | { |
| 122 | typ: "py_library", |
| 123 | name: "foo", |
| 124 | attrs: attrNameToString{ |
| 125 | "data": `["files/data.txt"]`, |
| 126 | "deps": `[":bar"]`, |
| 127 | "srcs": `[ |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 128 | "a.py", |
| 129 | "b/c.py", |
| 130 | "b/d.py", |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 131 | ]`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 132 | "srcs_version": `"PY3"`, |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 133 | "imports": `["."]`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 134 | }, |
| 135 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 136 | }, |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 137 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 138 | { |
| 139 | description: "py2 %s converts to a native py_library", |
| 140 | blueprint: `%s { |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 141 | name: "foo", |
| 142 | srcs: ["a.py"], |
| 143 | version: { |
| 144 | py2: { |
| 145 | enabled: true, |
| 146 | }, |
| 147 | py3: { |
| 148 | enabled: false, |
| 149 | }, |
| 150 | }, |
| 151 | |
| 152 | bazel_module: { bp2build_available: true }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 153 | }`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 154 | expectedBazelTargets: []testBazelTarget{ |
| 155 | { |
| 156 | typ: "py_library", |
| 157 | name: "foo", |
| 158 | attrs: attrNameToString{ |
| 159 | "srcs": `["a.py"]`, |
| 160 | "srcs_version": `"PY2"`, |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 161 | "imports": `["."]`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 162 | }, |
| 163 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 164 | }, |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 165 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 166 | { |
| 167 | description: "py3 %s converts to a native py_library", |
| 168 | blueprint: `%s { |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 169 | name: "foo", |
| 170 | srcs: ["a.py"], |
| 171 | version: { |
| 172 | py2: { |
| 173 | enabled: false, |
| 174 | }, |
| 175 | py3: { |
| 176 | enabled: true, |
| 177 | }, |
| 178 | }, |
| 179 | |
| 180 | bazel_module: { bp2build_available: true }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 181 | }`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 182 | expectedBazelTargets: []testBazelTarget{ |
| 183 | { |
| 184 | typ: "py_library", |
| 185 | name: "foo", |
| 186 | attrs: attrNameToString{ |
| 187 | "srcs": `["a.py"]`, |
| 188 | "srcs_version": `"PY3"`, |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 189 | "imports": `["."]`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 190 | }, |
| 191 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 192 | }, |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 193 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 194 | { |
| 195 | description: "py2&3 %s converts to a native py_library", |
| 196 | blueprint: `%s { |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 197 | name: "foo", |
| 198 | srcs: ["a.py"], |
| 199 | version: { |
| 200 | py2: { |
| 201 | enabled: true, |
| 202 | }, |
| 203 | py3: { |
| 204 | enabled: true, |
| 205 | }, |
| 206 | }, |
| 207 | |
| 208 | bazel_module: { bp2build_available: true }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 209 | }`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 210 | expectedBazelTargets: []testBazelTarget{ |
| 211 | { |
| 212 | // srcs_version is PY2ANDPY3 by default. |
| 213 | typ: "py_library", |
| 214 | name: "foo", |
| 215 | attrs: attrNameToString{ |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 216 | "srcs": `["a.py"]`, |
| 217 | "imports": `["."]`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 218 | }, |
| 219 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 220 | }, |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 221 | }, |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 222 | { |
| 223 | description: "%s: pkg_path in a subdirectory of the same name converts correctly", |
| 224 | dir: "mylib/subpackage", |
| 225 | filesystem: map[string]string{ |
| 226 | "mylib/subpackage/a.py": "", |
| 227 | "mylib/subpackage/Android.bp": `%s { |
| 228 | name: "foo", |
| 229 | srcs: ["a.py"], |
| 230 | pkg_path: "mylib/subpackage", |
| 231 | |
| 232 | bazel_module: { bp2build_available: true }, |
| 233 | }`, |
| 234 | }, |
| 235 | blueprint: `%s {name: "bar"}`, |
| 236 | expectedBazelTargets: []testBazelTarget{ |
| 237 | { |
| 238 | // srcs_version is PY2ANDPY3 by default. |
| 239 | typ: "py_library", |
| 240 | name: "foo", |
| 241 | attrs: attrNameToString{ |
| 242 | "srcs": `["a.py"]`, |
| 243 | "imports": `["../.."]`, |
| 244 | "srcs_version": `"PY3"`, |
| 245 | }, |
| 246 | }, |
| 247 | }, |
| 248 | }, |
| 249 | { |
| 250 | description: "%s: pkg_path in a subdirectory of a different name fails", |
| 251 | dir: "mylib/subpackage", |
| 252 | filesystem: map[string]string{ |
| 253 | "mylib/subpackage/a.py": "", |
| 254 | "mylib/subpackage/Android.bp": `%s { |
| 255 | name: "foo", |
| 256 | srcs: ["a.py"], |
| 257 | pkg_path: "mylib/subpackage2", |
| 258 | bazel_module: { bp2build_available: true }, |
| 259 | }`, |
| 260 | }, |
| 261 | blueprint: `%s {name: "bar"}`, |
| 262 | expectedError: fmt.Errorf("Currently, bp2build only supports pkg_paths that are the same as the folders the Android.bp file is in."), |
| 263 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 264 | } |
| 265 | |
| 266 | for _, tc := range testCases { |
| 267 | t.Run(tc.description, func(t *testing.T) { |
| 268 | runPythonLibraryTestCases(t, tc) |
| 269 | }) |
| 270 | } |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 0fc781c | 2021-08-19 19:21:30 +0000 | [diff] [blame] | 271 | } |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 19d399d | 2021-09-17 20:30:21 +0000 | [diff] [blame] | 272 | |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 273 | func TestPythonArchVariance(t *testing.T) { |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 274 | runPythonLibraryTestCases(t, pythonLibBp2BuildTestCase{ |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 275 | description: "test %s arch variants", |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 19d399d | 2021-09-17 20:30:21 +0000 | [diff] [blame] | 276 | filesystem: map[string]string{ |
| 277 | "dir/arm.py": "", |
| 278 | "dir/x86.py": "", |
| 279 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 280 | blueprint: `%s { |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 19d399d | 2021-09-17 20:30:21 +0000 | [diff] [blame] | 281 | name: "foo", |
| 282 | arch: { |
| 283 | arm: { |
| 284 | srcs: ["arm.py"], |
| 285 | }, |
| 286 | x86: { |
| 287 | srcs: ["x86.py"], |
| 288 | }, |
| 289 | }, |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 290 | }`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 291 | expectedBazelTargets: []testBazelTarget{ |
| 292 | { |
| 293 | typ: "py_library", |
| 294 | name: "foo", |
| 295 | attrs: attrNameToString{ |
| 296 | "srcs": `select({ |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 19d399d | 2021-09-17 20:30:21 +0000 | [diff] [blame] | 297 | "//build/bazel/platforms/arch:arm": ["arm.py"], |
| 298 | "//build/bazel/platforms/arch:x86": ["x86.py"], |
| 299 | "//conditions:default": [], |
Liz Kammer | 78cfdaa | 2021-11-08 12:56:31 -0500 | [diff] [blame] | 300 | })`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 301 | "srcs_version": `"PY3"`, |
Cole Faust | b09da7e | 2022-05-18 10:57:33 -0700 | [diff] [blame] | 302 | "imports": `["."]`, |
Sam Delmerico | 75539d6 | 2022-01-31 14:37:29 +0000 | [diff] [blame] | 303 | }, |
| 304 | }, |
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux | 19d399d | 2021-09-17 20:30:21 +0000 | [diff] [blame] | 305 | }, |
| 306 | }) |
| 307 | } |
Cole Faust | 53b6209 | 2022-05-12 15:37:02 -0700 | [diff] [blame] | 308 | |
| 309 | func TestPythonLibraryWithProtobufs(t *testing.T) { |
| 310 | runPythonLibraryTestCases(t, pythonLibBp2BuildTestCase{ |
| 311 | description: "test %s protobuf", |
| 312 | filesystem: map[string]string{ |
| 313 | "dir/mylib.py": "", |
| 314 | "dir/myproto.proto": "", |
| 315 | }, |
| 316 | blueprint: `%s { |
| 317 | name: "foo", |
| 318 | srcs: [ |
| 319 | "dir/mylib.py", |
| 320 | "dir/myproto.proto", |
| 321 | ], |
| 322 | }`, |
| 323 | expectedBazelTargets: []testBazelTarget{ |
| 324 | { |
| 325 | typ: "proto_library", |
| 326 | name: "foo_proto", |
| 327 | attrs: attrNameToString{ |
| 328 | "srcs": `["dir/myproto.proto"]`, |
| 329 | }, |
| 330 | }, |
| 331 | { |
| 332 | typ: "py_proto_library", |
| 333 | name: "foo_py_proto", |
| 334 | attrs: attrNameToString{ |
| 335 | "deps": `[":foo_proto"]`, |
| 336 | }, |
| 337 | }, |
| 338 | { |
| 339 | typ: "py_library", |
| 340 | name: "foo", |
| 341 | attrs: attrNameToString{ |
| 342 | "srcs": `["dir/mylib.py"]`, |
| 343 | "srcs_version": `"PY3"`, |
| 344 | "imports": `["."]`, |
| 345 | "deps": `[":foo_py_proto"]`, |
| 346 | }, |
| 347 | }, |
| 348 | }, |
| 349 | }) |
| 350 | } |