Skip to content

Commit

Permalink
Allow users to disable bindep feature via an environment variable (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssbarnea authored Oct 4, 2024
1 parent bf0c45d commit d2adcc5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ This plugin will add the following list of bindep profiles:
This should allow developers to modify their `bindep.txt` file to include
system dependencies specific to a single tox environment if they wish.
To disable bindep feature, you can define `TOX_EXTRA_BINDEP=0` in your
environment.
3 changes: 2 additions & 1 deletion src/tox_extra/hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def tox_on_install(tox_env: ToxEnv, arguments: Any, section: str, of_type: str)
*tox_env.name.split("-"),
]
)
check_bindep(path=pathlib.Path.cwd(), profiles=profiles)
if os.environ.get("TOX_EXTRA_BINDEP", "1") != "0":
check_bindep(path=pathlib.Path.cwd(), profiles=profiles)


@impl
Expand Down

0 comments on commit d2adcc5

Please sign in to comment.