Poetry plugin for mise version manager
mise plugin add poetry
Check mise readme for instructions on how to install & manage versions.
MISE_POETRY_INSTALL_URL
is an optional variable you can specific to point to
the hosted installer of your choosing, e.g. get-poetry.py
or the new install-poetry.py
(compatible with 1.1.7+ and
default in 1.2).
For example, to force install-poetry.py
on 1.1.9:
MISE_POETRY_INSTALL_URL=https://install.python-poetry.org mise install poetry 1.1.9
Doing so is not recommended and may result in poetry installations which
disregard the mise-python
plugin. See issue #10.
Automatically activate the poetry virtualenv when entering the directory with the following
.mise.toml
:
[tools]
poetry = { version="latest", pyproject="{{ config_root }}/pyproject.toml" }
python = "3.11" # must be after poetry so the poetry bin is first in PATH
Note: using the {{ config_root }}
variable ensures that nested directories
containing .mise*.toml
files correctly inherit the virtual environment from
the parent directory.
Set MISE_POETRY_AUTO_INSTALL=1
to automatically run poetry install
to create the virtualenv.
You can also set MISE_POETRY_VENV_AUTO=1
to automatically activate the virtualenv only if the
project contains a poetry.lock
.
Licensed under the MIT license.