Skip to content
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

feat: virtualenv improvements #389

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

scop
Copy link
Contributor

@scop scop commented Aug 13, 2023

Some virtualenv improvements, see individual commits for details.

Standard venv activation typically sets it to `(name) `. Parse that
first to avoid having to parse pyvenv.cfg.
@elebertus
Copy link

I think more or less the same as https://github.com/justjanne/powerline-go/pull/387/files right?

@scop
Copy link
Contributor Author

scop commented Aug 14, 2023

That one does not look at VIRTUAL_ENV_PROMPT at all, but the part following it seems the same indeed, and more succinctly implemented over there. I'll drop that one from here.

@scop
Copy link
Contributor Author

scop commented Aug 14, 2023

...except that I won't :) The implementation here falls back to the venv dir even if loading the pyvenv.cfg fails for some reason. For example, does it exist in all venv dirs, e.g. ones created by old versions of virtualenv?

@elebertus
Copy link

When I get a chance I'll compare our changes, we can probably just merge them into one PR since they're both related. 👍

@duckworth
Copy link

any chance of getting this merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants