From a pants plugin, I want to inject additional p...
# development
p
From a pants plugin, I want to inject additional paths in
PEX_EXTRA_SYS_PATH
(the pex equivalent to
PYTHONPATH
) when pants runs
pytest
or
pylint
, and maybe when using goals like
run
or
repl
. For pytest, there is a
PytestPluginSetupRequest -> PytestPluginSetup
that I can extend to allow plugins to add paths to
PEX_EXTRA_SYS_PATH
. But what about other tools. Any ideas for what a generic interface could be for plugins to inject
PYTHONPATH
(or actually
PEX_EXTRA_SYS_PATH
in most cases) entries? Should each of these gain their own plugin hook, following the pattern established for pytest, like: •
PylintPluginSetupRequest -> PylintPluginSetup
RunGoalPluginSetupRequest -> RunGoalPluginSetup
ReplGoalPluginSetupRequest -> ReplGoalPluginSetup
Or should it be something more generic like:
PluginExtraSysPathsRequest -> PluginExtraSysPaths