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

Development Dependency Overrides #9258

Open
iloveitaly opened this issue Nov 20, 2024 · 3 comments
Open

Development Dependency Overrides #9258

iloveitaly opened this issue Nov 20, 2024 · 3 comments
Labels
question Asking for clarification or support

Comments

@iloveitaly
Copy link

One of the things I've always missed from ruby is development dependency overrides. Here's the situation:

  • You have a dependency in one of your projects that is published on pypi
  • Something is broken in it. You clone it with hopes of fixing it locally before getting the patch merged upstream.
  • You want to temporarily override the pypi reference to point to a path on your local filesystem without modifying pyproject.toml

Ruby allows you to do this with:

bundle config set local.rack ~/Work/git/rack

It would be great if uv provided similar sort of functionality.

@charliermarsh
Copy link
Member

I believe this is possible today with:

[tool.uv]
override-dependencies = ["dependency @ file:///path/to/dependency"]

@charliermarsh charliermarsh added the question Asking for clarification or support label Nov 20, 2024
@ReinforcedKnowledge
Copy link

I think you can also run code with the --with option of uv run command, or --with-requirements if you have many. That won't modify the pyproject.toml and the code will only run in an ephemeral virtual environment.

@iloveitaly
Copy link
Author

This is awesome. Will try this out and report back. Thanks for all of the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

3 participants