Closed patrick-kidger closed 21 hours ago
uv run --with-requirements
includes those requirements on top of your project ones. Maybe you want to set managed = false
in your project?
Ah, I didn't know that existed! Okay, giving it a try: my understanding is that to use requirements.txt
as the lock file instead, then I should replace uv run <foo>
with
uv pip compile pyproject.toml -o requirements.txt &>/dev/null && uv run --with-requirements requirements.txt <foo>
Thanks for your help :)
We'd like to use
uv
, whilst usingrequirements.txt
as the lockfile format.(Right now this is important for interopability with other tools: until PEP751 becomes reality then
requirements.txt
is the de-facto common denominator understood by everyone.)For that purpose we're currently using
uv run --with-requirements requirements.txt <rest of command here>
. However, this seems to generate a spuriousuv.lock
file.Given that
--with-requirements
involves explicitly opting in to using a different lockfile, then I'm not sure if this is unexpected behaviour and I'm raising a bug report, or if this is something there should be a flag to toggle and I'm raising a feature request!