Commit db0a777
authored
Break mutual dependency between please_pex and test runners (#266)
The please_pex tool depends on various third-party modules for the
built-in test runner bootstraps, which in turn require please_pex in
order to be built. This circular dependency prevents the plugin from
being built entirely from source - see #265.
The root cause of this circular dependency is the presence of the entry
points in `//third_party/python:{behave,pytest}` - `python_wheel`
doesn't require please_pex per se, but the use of the `binary` or
`entry_points` parameters results in `python_binary` being used to build
the outputs, which does require please_pex in order to make them
executable. The entry points aren't actually necessary on these targets,
though, because the generated .pex files aren't executed directly - they
are just unzipped and concatenated onto the please_pex binary to form
the bootstrap archive containing the built-in test runners and their
transitive dependencies.
Remove the `entry_points` parameters from the behave and pytest targets,
and refactor the `//tools/please_pex` dependency tree so that the test
runners and all of their transitive dependencies are present when the
bootstrap archive is concatenated onto the main please_pex binary.
The bootstrap archive's contents remain the same, with the following
omissions:
- `.bootstrap/plz.py`
- This is written by please_pex when creating an executable .pex - its
presence isn't meaningful or required in the bootstrap archive.
- `.bootstrap/py/_vendored_packages/apipkg-2.0.0.dist-info/__init__.py`
- `.bootstrap/py/_vendored_packages/iniconfig-1.1.1.dist-info/__init__.py`
- These empty files were created by please_pex when creating the
executable .pex for pytest - their presence isn't meaningful or
required in the bootstrap archive.
Fixes #265.1 parent d584c6e commit db0a777
2 files changed
+12
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | | - | |
236 | 235 | | |
237 | 236 | | |
238 | 237 | | |
| |||
271 | 270 | | |
272 | 271 | | |
273 | 272 | | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | 273 | | |
279 | 274 | | |
280 | 275 | | |
| |||
417 | 412 | | |
418 | 413 | | |
419 | 414 | | |
420 | | - | |
| 415 | + | |
421 | 416 | | |
422 | 417 | | |
423 | 418 | | |
424 | 419 | | |
425 | 420 | | |
426 | 421 | | |
427 | 422 | | |
428 | | - | |
| 423 | + | |
429 | 424 | | |
430 | 425 | | |
431 | 426 | | |
432 | 427 | | |
433 | 428 | | |
434 | 429 | | |
435 | 430 | | |
436 | | - | |
| 431 | + | |
437 | 432 | | |
438 | 433 | | |
439 | 434 | | |
440 | 435 | | |
441 | 436 | | |
442 | 437 | | |
443 | 438 | | |
444 | | - | |
| 439 | + | |
445 | 440 | | |
446 | 441 | | |
447 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | 25 | | |
33 | 26 | | |
34 | 27 | | |
35 | 28 | | |
36 | 29 | | |
37 | | - | |
| 30 | + | |
38 | 31 | | |
39 | 32 | | |
40 | 33 | | |
41 | 34 | | |
| 35 | + | |
42 | 36 | | |
43 | 37 | | |
44 | 38 | | |
45 | 39 | | |
46 | 40 | | |
| 41 | + | |
47 | 42 | | |
48 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments