hatch icon indicating copy to clipboard operation
hatch copied to clipboard

Support environment package install with `uv`

Open dannyfriar opened this issue 1 year ago • 1 comments
trafficstars

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?

dannyfriar avatar Feb 18 '24 22:02 dannyfriar

Yes but is blocked by https://github.com/astral-sh/uv/issues/1396

ofek avatar Feb 19 '24 03:02 ofek

Looks like https://github.com/astral-sh/uv/issues/1396 is fixed. What's needed to use uv with hatch now?

domoritz avatar Mar 07 '24 17:03 domoritz

Only my implementation.

ofek avatar Mar 07 '24 17:03 ofek

Could you elaborate? I don't follow.

domoritz avatar Mar 07 '24 18:03 domoritz

I mean the time it takes to do the literal implementation. Give me a few weeks.

ofek avatar Mar 07 '24 19:03 ofek

https://github.com/pypa/hatch/pull/1380

ofek avatar Apr 12 '24 20:04 ofek

https://hatch.pypa.io/dev/how-to/environment/select-installer/

ofek avatar Apr 12 '24 20:04 ofek

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?

manmartgarc avatar Apr 28 '24 09:04 manmartgarc

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?

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/

MtkN1 avatar Apr 28 '24 09:04 MtkN1