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

Option to prepare & print path to the virtualenv to be used #1381

Open
tanavamsikrishna opened this issue Apr 29, 2024 · 0 comments
Open

Option to prepare & print path to the virtualenv to be used #1381

tanavamsikrishna opened this issue Apr 29, 2024 · 0 comments

Comments

@tanavamsikrishna
Copy link

tanavamsikrishna commented Apr 29, 2024

This is within the context of using pipx run

While editing a local script in an IDE, the path to the virtualenv or python needs to be provided (for linting & autocompletions).
The virtualenv needs to have the dependencies installed as it is not a typical pyproject.toml or setup.py based project, and thus cannot be managed by IDEs.

Proposed idea:

  1. Add a new flag --print-python-path to pipx run
  2. Check if this flag is set in the function pipx.commands.run.run_script and skip calling any exec_app but instead print the path to python executable (to stdout) and exit

(The above idea is inspired by rust-script's --package option)

Alternatives:

  • Print a parsable output for --verbose option and add --dry-run option.
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

No branches or pull requests

1 participant