mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2025-09-18 03:13:25 +00:00
Add runtime option for forcing error if poetry is not found
This commit is contained in:
@@ -114,8 +114,6 @@ def find_transients(packages: PackageMap, dependency_name: str) -> Set[PoetryPac
|
||||
|
||||
def check_preconditions(venv: ToxVirtualEnv, action: ToxAction) -> "_poetry.Poetry":
|
||||
"""Check that the local project environment meets expectations"""
|
||||
from tox_poetry_installer import _poetry
|
||||
|
||||
# Skip running the plugin for the packaging environment. PEP-517 front ends can handle
|
||||
# that better than we can, so let them do their thing. More to the point: if you're having
|
||||
# problems in the packaging env that this plugin would solve, god help you.
|
||||
@@ -124,6 +122,8 @@ def check_preconditions(venv: ToxVirtualEnv, action: ToxAction) -> "_poetry.Poet
|
||||
f"Skipping isolated packaging build env '{action.name}'"
|
||||
)
|
||||
|
||||
from tox_poetry_installer import _poetry
|
||||
|
||||
try:
|
||||
return _poetry.Factory().create_poetry(venv.envconfig.config.toxinidir)
|
||||
# Support running the plugin when the current tox project does not use Poetry for its
|
||||
|
Reference in New Issue
Block a user