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 uv/pip's editable_mode configuration #2356

Open
mdekstrand opened this issue Oct 25, 2024 · 2 comments
Open

Support uv/pip's editable_mode configuration #2356

mdekstrand opened this issue Oct 25, 2024 · 2 comments
Labels
🐍 pypi Issue related to PyPI dependencies 👋 good first issue Good for newcomers

Comments

@mdekstrand
Copy link

Problem description

Right now, Pixi uses uv's default settings for installing editable dependencies.

However, these defaults cause problems with packages being discovered by Pylance when editing in VS Code. The solution appears to be to install in either strict or compat mode (https://github.com/microsoft/pylance-release/blob/main/TROUBLESHOOTING.md#editable-install-modules-not-found). uv exposes a way to set this through its config-settings (https://docs.astral.sh/uv/reference/settings/#pip_config-settings), but I cannot find a way to set this setting for Pixi's usage of uv.

I might be migrating own packages to a different build backend in part to work around this problem, but it would probably help folks using setuptools to make editable installs statically-discoverable.

@claudius-kienle
Copy link

I would support this, as Pylance does not work with standard editable installs except installed with

pip install -e your-package --config-settings editable_mode=compat

I tried to add the editable_mode argument to the PyPiRequirement. However, I am not sure what is missing so I can pass it in the pixi.toml.

My changes can be found at https://github.com/claudius-kienle/pixi/tree/feat-config-settings

@tdejager
Copy link
Contributor

tdejager commented Nov 8, 2024

Good idea! Thanks for the issue.

@tdejager tdejager added 🐍 pypi Issue related to PyPI dependencies 👋 good first issue Good for newcomers labels Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐍 pypi Issue related to PyPI dependencies 👋 good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants