mise icon indicating copy to clipboard operation
mise copied to clipboard

Alternative backends for python venv

Open Adirelle opened this issue 9 months ago • 1 comments

The core python plugin can be set up to automatically create a virtual environment if it does not exist. In its current state, it only uses venv but there are alternative tools, like pipenv, poetry or pdm, to cite a few.

Would it be possible to add an option to the python core plugin to select which backend to use? This could be handled either by hardcoding the list of the backends in the plugin with the right commands to use, or by allowing the user to specify the command to create the virtual environment.

e.g. either

[env]
_.python.venv = { path = ".venv", create = true, backend = "pdm" } 

or

[tools]
pdm = "latest"
[env]
_.python.venv = { path = ".venv", create = true, command = "pdm sync" } 

Adirelle avatar Apr 27 '24 16:04 Adirelle

I like this idea

jdx avatar Apr 27 '24 16:04 jdx