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

Print resolved interpreter when using env detection #379

Merged
merged 19 commits into from
Jun 17, 2024

Conversation

stasfilin
Copy link
Contributor

Good evening,

This is a super quick fix for #372

image

One thing that could be useful is to display the resolved environment when --python auto is used (or maybe even every time regardless?)

What I did was create a new param, log_resolved. If True, print the resolved Python path.

I have only activated this to the --python auto option.

stasfilin and others added 3 commits June 12, 2024 22:18
Now we display the resolved environment when --python auto is used

Signed-off-by: Stanislav Filin <[email protected]>
Signed-off-by: Stanislav Filin <[email protected]>
@stasfilin
Copy link
Contributor Author

@kemzeb Good evening,
Please review this MR when you have time.

Thanks

Copy link
Collaborator

@kemzeb kemzeb left a comment

Choose a reason for hiding this comment

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

This looks fine, just a couple of things.

src/pipdeptree/_detect_env.py Outdated Show resolved Hide resolved
src/pipdeptree/_detect_env.py Outdated Show resolved Hide resolved
Signed-off-by: Stanislav Filin <[email protected]>
Co-authored-by: Kemal Zebari <@kemzeb>
Signed-off-by: Stanislav Filin <[email protected]>
src/pipdeptree/__main__.py Outdated Show resolved Hide resolved
tests/test_detect_env.py Outdated Show resolved Hide resolved
Signed-off-by: Stanislav Filin <[email protected]>
(resolved python: /path/to/interpreter/python3)

Signed-off-by: Stanislav Filin <[email protected]>
Co-authored-by: Kemal Zebari <@kemzeb>
tests/test_main.py Outdated Show resolved Hide resolved
tests/test_main.py Outdated Show resolved Hide resolved
tests/test_main.py Outdated Show resolved Hide resolved
@kemzeb kemzeb changed the title Adding log_resolved param to detect_active_interpreter Report what virtual environment was chosen when using env detection Jun 15, 2024
@kemzeb kemzeb changed the title Report what virtual environment was chosen when using env detection Print resolved interpreter when using env detection Jun 15, 2024
Start to use ScriptRunner to run --python=auto

Signed-off-by: Stanislav Filin <[email protected]>
tests/test_pipdeptree.py Outdated Show resolved Hide resolved
@kemzeb kemzeb merged commit c2245d6 into tox-dev:main Jun 17, 2024
11 checks passed
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.

2 participants