-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pew style project management to peotry #704
Comments
I'm not familiar with pew. Is the value-add here is that poetry would remember where a project is so that developers can quickly |
cd + activate the venv in a short cmd, yes.
Le 09/08/2019 à 16:27, Bryce Drennan a écrit :
… I'm not familiar with pew. Is the value-add here is that poetry would
remember where a project is so that developers can quickly |cd| to it?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#704>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAMYVXR7NSY7C6TID4ZYZ73QDV5F7ANCNFSM4GIVVOHQ>.
|
I think this goes beyond the purpose of Poetry. However, once the plugin system (see #1237) is ready that might be a good fit for it. |
In fact this is a single reason why I need virtualenvwrapper together with poetry. So it would be really nice to have |
I just made a first attempt at that. If you are interested, check out poetry-alias—feedback appreciated. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue
pew, an alternative way to manage virtualenv, has a "project" feature. You give a name to a virtualenv (
pew new venv_name
), then tie this name to the directory (pew setproject .
). You can then activate the virtualenv from anywhere doingpew workon venv_name
. It will activate the venv whether you are in the project dir or not. If you are not in the project dir, it will cd you to the project dir. It will do so even if the virtualenv is already activated.Poetry doesn't work by virtualenv name though, so the feature would need a tweak. We could imagine it as a alias, with an API like:
Because
poetry init
already asks for a package name, it can offer to use this name as an alias by default, provided it's not already used elsewhere (which will happen if you have several versions of the same code lying around). Of course the user is free to type in whatever he or she wants, and should be able to disable the automatic cd.This does require a persistent setting file in the user directory to list all aliases (is it ok to put it in
config.toml
?), and some error handling for the case where an alias reference a missing project.The text was updated successfully, but these errors were encountered: