tox.ini > [testenv:foobar] section > deps: How to create a hook to dynamic provide/append values for it before install the python package? #3606
-
|
I need to create a plugin to include/change dependencies in some specific testenv, and these dependencies aren't static. I'd like to know if there's a hook that can be used to provide valid values for deps, or if there's a good hook that would be useful to implement this feature, and what are the important atributes or function that need to implements/override. Also, is there any documentation on how to modify the deps processing behavior and docs about the hook execution ordering? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
The relevant plugin hooks for this are:
There is no dedicated hook for modifying The hook execution order follows the plugin loading order (entry points). See the plugin spec at For a practical example of a plugin that modifies dependencies, you can look at existing tox plugins on PyPI that extend the dependency handling. |
Beta Was this translation helpful? Give feedback.
The relevant plugin hooks for this are:
tox_add_env_config— called when environment configuration is being built. You can use this to register custom config keys or modify existing ones.tox_on_install— called before executing an installation command. Receivestox_env,arguments,section, andof_typeparameters, allowing you to intercept and modify what gets installed.There is no dedicated hook for modifying
depsdirectly — you'd usetox_add_env_configto register your config andtox_on_installto inject additional dependencies at install time.The hook execution order follows the plugin loading order (entry points). See the plugin spec at
src/tox/plugin/spec.pyfor the full list of …