Update poetry dependency to be installed as optional extra

When running 'poetry remove tox-poetry-installer' in the same env as
poetry is installed to, poetry will uninstall itself. This is, obviously,
not ideal.

This change makes poetry an optional dependency so that the plugin can be
installed (and uninstalled) alongside poetry in the same env without
breaking the poetry installation. The intention is that the plugin can be
installed with the 'poetry' extra when being installed to an isolated environment
where poetry is not otherwise available.

This is a mitigation of Issue #2 as an alternative to vendorization of the enitre
poetry project 😬
This commit is contained in:
2020-12-04 17:50:29 -05:00
parent afad7663f0
commit 872f6b0892
2 changed files with 38 additions and 35 deletions

View File

@@ -32,11 +32,14 @@ classifiers = [
[tool.poetry.plugins.tox]
poetry_installer = "tox_poetry_installer"
[tool.poetry.extras]
poetry = ["poetry"]
[tool.poetry.dependencies]
python = "^3.6.1"
poetry = "^1.0.0"
poetry = {version = "^1.0.0", optional = true}
poetry-core = "^1.0.0"
tox = "^2.3.0 || ^3.0.0"
tox = "^3.0.0"
[tool.poetry.dev-dependencies]
bandit = "^1.6.2"