Skip to content

Latest commit

 

History

History
60 lines (40 loc) · 1.94 KB

README.md

File metadata and controls

60 lines (40 loc) · 1.94 KB

mise-poetry

Poetry plugin for mise version manager

Build History

Build history

Installation

mise plugin add poetry

Usage

Check mise readme for instructions on how to install & manage versions.

Overriding installer

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.

Virtualenv Activation

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.

License

Licensed under the MIT license.