Break mutual dependency between please_pex and test runners #266
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_wheeldoesn't require please_pex per se, but the use of thebinaryorentry_pointsparameters results inpython_binarybeing 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_pointsparameters from the behave and pytest targets, and refactor the//tools/please_pexdependency 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.bootstrap/py/_vendored_packages/apipkg-2.0.0.dist-info/__init__.py.bootstrap/py/_vendored_packages/iniconfig-1.1.1.dist-info/__init__.pyFixes #265.