Skip to content

Commit

Permalink
Update poetry dependency to be installed as optional extra
Browse files Browse the repository at this point in the history
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 😬
  • Loading branch information
enpaul committed Dec 4, 2020
1 parent afad766 commit 872f6b0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 35 deletions.
66 changes: 33 additions & 33 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 872f6b0

Please sign in to comment.