hatch
hatch copied to clipboard
Support environment package install with `uv`
The new uv tool (https://astral.sh/blog/uv) is much faster than pip in a lot of cases.
Would it be possible to add support to the hatch environment building to allow using uv pip in place of pip?
Yes but is blocked by https://github.com/astral-sh/uv/issues/1396
Looks like https://github.com/astral-sh/uv/issues/1396 is fixed. What's needed to use uv with hatch now?
Only my implementation.
Could you elaborate? I don't follow.
I mean the time it takes to do the literal implementation. Give me a few weeks.
https://github.com/pypa/hatch/pull/1380
https://hatch.pypa.io/dev/how-to/environment/select-installer/
How can indeed verify that uv is being used? I am trying to just compare environment creation time with installer = "uv" and without it and I don't see much of a difference. Should I also add it to the environments dependencies section?
How can indeed verify that
uvis being used? I am trying to just compare environment creation time withinstaller = "uv"and without it and I don't see much of a difference. Should I also add it to the environmentsdependenciessection?
As far as I know, no functionality regarding uv has been released. To try this, use the development version.
pipx install git+https://github.com/pypa/hatch
Feature for uv is planned for v1.10.0.
https://hatch.pypa.io/dev/blog/2024/04/18/hatch-v1100/