cool-easter-32542
12/13/2024, 4:03 PMpytest_runner.pex
Describe the solution you'd like
Naively I thought that this would "just work already"
[pytest]
install_from_resolve = "python-default"
requirements = [
"//:reqs#pytest",
"//my:plugin"
]
But that does not cause //my:plugin to appear in the sandbox. The contents of requirements is already a list of targets, so supporting first party targets either there or in a new field seems reasonable.
Describe alternatives you've considered
In this particularity case it is possible to configure the plugin through conftest.py. This works, but has downsides:
• conftest.py is spooky hard to reason about magic
• The plugin (and transitive deps) are duplicated as deps of every test instead of being part of the runner pex.
Additional context
pytest has a particularly rich plugin ecosystem, but this seems like a generally useful facility for any of the Python install_from_resolve subsystems.
pantsbuild/pants