heroku / heroku/buildpacks-python

Use `uv pip` instead of `pip` (or optionally support it)

Open
#452 3 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
33
Forks
3
Avg merge
12h 51m
Merged PRs (30d)
9

Description

`pip install` is used here: https://github.com/heroku/buildpacks-python/blob/0bcbf989c8f473e70345829003f4447c0eabf4a3/src/layers/pip_dependencies.rs#L81-L89.

It would be great to also / alternatively use `uv pip install`. This is intended to be a drop-in replacement for `pip`, but with much faster dependency resolution and other optimizations. Ref: https://docs.astral.sh/uv/pip/

In practice, I notice a decent speed up when using `uv pip install` over `pip install`, and it would be a great improvement to have this speedup in Heroku's Python buildpack.

I think it probably makes sense as an opt-in feature with an environment variable or similar, since there's no way to distinguish when to use uv pip or pip based on the file structure alone.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.