-
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
Support a --venv flag similar to pipenv #401
Comments
|
Unfortunately (spoonman) rendering » poetry show -v
Creating virtualenv rendering-py3.7 in /home/j/.cache/pypoetry/virtualenvs
Using virtualenv: /home/j/.cache/pypoetry/virtualenvs/rendering-py3.7 |
Agreed it would be better if |
Hi, Coupled with direnv, is use Having a way to query venv path quickly would be very nice. Regards, |
I have a similar use case where I'd like to activate the virtualenv programmatically (without resorting to nesting shells).
works well for me, but unfortunately there is no easy alternative for poetry. |
I'm up to write a patch to add this if there's a chance for it to be accepted. @sdispater? |
@K900 I had some spare time this morning so I threw together a quick patch myself. Want to take a look and see if that's roughly what you have in mind? |
This can be closed now since @sdispater added a new feature in #731
will return the path to the environment. You can call the following to activate your environment consistently:
|
Agreed, this is the way to go -- thanks, @sdispater !. And to follow up on @zymergen-luke , for you Windows folks out there writing shell functions, it's |
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
pipenv supports a flag
--venv
flag that simply prints the path to the existing venv, or returns a non-0 status code if it doesn't exist. This allows solutions like dense-analysis/ale#1656 to auto-detect (without unwanted side effects) whether pipenv should be used to run, for example, a linter.The closest thing I've found in poetry so far to this effect is
debug:info
, which will unfortunately auto-create the virtualenv if it doesn't exist, which would lead to false positives in scenarios like the ALE one.I may be able to take a crack at this one personally, I don't imagine it'll be the hardest task in the world.
The text was updated successfully, but these errors were encountered: