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

Support for PDM's .pdm-python file #23629

Open
KalleDK opened this issue Jun 17, 2024 · 3 comments
Open

Support for PDM's .pdm-python file #23629

KalleDK opened this issue Jun 17, 2024 · 3 comments
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality needs community feedback Awaiting community feedback

Comments

@KalleDK
Copy link

KalleDK commented Jun 17, 2024

PDM places a .pdm-python (text) file in the root of the project with path to the python binary in the venv currently used.

I would like for it to be a suggestion when selection the interpreter - maybe even have the popup with a new venv found when it changes.

# Example
cat .pdm-python
/home/vscode/.local/share/venv/proxy/bin/python

See more https://pdm-project.org/latest/usage/venv/

Edit:
Multiple people have asked for use cases, so here is a list of some of them

  • You use multiple venv's due to either python version or packages installed
  • You keep your venv's out of the project folder to not "polute" the path (and save it from git clean)
  • You might have a shared venv between 2 or more projects (this is less common though)
  • I've tried to add the path with all the venv, but finding the correct between 30+ venvs is a hassle - especially is you have to change between two or more during development
@KalleDK KalleDK added the feature-request Request for new features or functionality label Jun 17, 2024
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Jun 17, 2024
@karthiknadig karthiknadig added the needs community feedback Awaiting community feedback label Jun 17, 2024
Copy link

Thanks for the feature request! We are going to give the community 60 days from when this issue was created to provide 7 👍 upvotes on the opening comment to gauge general interest in this idea. If there's enough upvotes then we will consider this feature request in our future planning. If there's unfortunately not enough upvotes then we will close this issue.

@karthiknadig karthiknadig added area-environments Features relating to handling interpreter environments and removed triage-needed Needs assignment to the proper sub-team labels Jun 17, 2024
@KalleDK
Copy link
Author

KalleDK commented Jun 21, 2024

Created a very not well tested prototype https://marketplace.visualstudio.com/items?itemName=KalleDK.pdminterpreter

When installed it wil change interpreter based on the .pdm-python automatic, and you can use "Select Interpreter based on PDM" to change between multiple pdm venvs

@KalleDK
Copy link
Author

KalleDK commented Jul 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-environments Features relating to handling interpreter environments feature-request Request for new features or functionality needs community feedback Awaiting community feedback
Projects
None yet
Development

No branches or pull requests

2 participants