powerlevel10k
powerlevel10k copied to clipboard
add support for poetry virtualenv
Hi,
Here is a little patch in order to support poetry when looking for a project virtualenv.
This change adds two configuration variables:
# If set to "true", get the virtualenv from poetry if available
typeset -g POWERLEVEL9K_VIRTUALENV_SHOW_WITH_POETRY=false
# Show poetry venv only when in a directory tree containing pyproject.toml.
typeset -g POWERLEVEL9K_POETRY_VENV_PROJECT_ONLY=true
Hello, I tried to use you branch, but it didn't work I see always virtualenv from "virtual env" , and not poetry one
Hello, @romkatv Thanks for your awesome work! Could you consider to support Poetry in future?
It's a valid feature request. Unfortunately, I cannot merge the PR as is. At this point I would need to go read about poetry and implement the thing. Unfortunately, I'm unlikely to ever find time for that.
What could/should I do to improve this MR?
@AleksandrLiadov the way I implemented support for poetry is to extend the current support for python venv. This means that if you want to mix both poetry and pyenv or any other venv technology then p10k only pick one. Another problem you may be facing is p10k already has something in its cache regarding this location.
+1 Poetry is fast becoming the way to do projects in Python.
I'll give a +1! Would be nice, and agreed that Poetry is certainly becoming more popular
Hello everyone! I commented on #2450 that there is an alternative to have Poetry support:
https://github.com/romkatv/powerlevel10k/pull/2450#issuecomment-1978792540
I hope that helps. Cheers!
+1 Poetry is fast becoming the way to do projects in Python.
Never mind. We may be moving on to https://github.com/astral-sh/rye lol. The Python ecosystem is becoming as nutty as JavaScript's…