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

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

scop
Copy link
Contributor

@scop scop commented Aug 13, 2023

Some virtualenv improvements, see individual commits for details.

@elebertus
Copy link
Contributor

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
Contributor

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?

Copy link
Owner

@justjanne justjanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great overall, though

segment-virtualenv.go Outdated Show resolved Hide resolved
scop and others added 2 commits June 17, 2024 08:03
Standard venv activation typically sets it to `(name) `. Parse that
first to avoid having to parse pyvenv.cfg.

Co-authored-by: Janne Mareike Koschinski <[email protected]>
@scop scop force-pushed the feat/virtualenv-improvements branch from 3241c1b to ef5e672 Compare June 17, 2024 05:03
@justjanne justjanne merged commit f5424ea into justjanne:main Jun 17, 2024
2 checks passed
@scop scop deleted the feat/virtualenv-improvements branch June 18, 2024 15:05
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.

4 participants