mirror of
https://github.com/enpaul/tox-poetry-installer.git
synced 2024-12-05 01:40:44 +00:00
Ethan Paul
198287a633
Standardize on "import module" format rather than "from module import foo" format Remove _poetry stub module since we directly depend on the poetry package now Fix conflicts between modules and parameters both named 'poetry' Fixes #92
48 lines
1.2 KiB
Python
48 lines
1.2 KiB
Python
"""Add required env configuration options to the tox INI file"""
|
|
|
|
from typing import List
|
|
|
|
import tox.config.sets
|
|
import tox.plugin
|
|
|
|
|
|
# pylint: disable=missing-function-docstring
|
|
@tox.plugin.impl
|
|
def tox_add_env_config(
|
|
env_conf: tox.config.sets.EnvConfigSet,
|
|
):
|
|
env_conf.add_config(
|
|
"poetry_dep_groups",
|
|
of_type=List[str],
|
|
default=[],
|
|
desc="List of Poetry dependency groups to install to the environment",
|
|
)
|
|
|
|
env_conf.add_config(
|
|
"install_project_deps",
|
|
of_type=bool,
|
|
default=True,
|
|
desc="Automatically install all Poetry primary dependencies to the environment",
|
|
)
|
|
|
|
env_conf.add_config(
|
|
"require_locked_deps",
|
|
of_type=bool,
|
|
default=False,
|
|
desc="Require all dependencies in the environment be installed using the Poetry lockfile",
|
|
)
|
|
|
|
env_conf.add_config(
|
|
"require_poetry",
|
|
of_type=bool,
|
|
default=False,
|
|
desc="Trigger a failure if Poetry is not available to Tox",
|
|
)
|
|
|
|
env_conf.add_config(
|
|
"locked_deps",
|
|
of_type=List[str],
|
|
default=[],
|
|
desc="List of locked dependencies to install to the environment using the Poetry lockfile",
|
|
)
|