-
Notifications
You must be signed in to change notification settings - Fork 739
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
Feature request: Generate requirements.txt
from uv.lock
#6007
Comments
I think something like this is reasonable but it probably won't happen immediately. (PEP 751 is ultimately a better solution but I'd still support |
Also, we already have a way to generate |
It doesn't really seem like a great outcome for users to have both a |
If using |
Can you clarify what you mean by "references to the venv"? I haven't written documentation for using the new APIs in Docker yet. |
I'm talking about this section of the doc:
I'm assuming if I use
That's a simple explanation as to why it's not referenced ^^ I'm just ensuring that the |
We may add support for syncing to a system environment (as requested in #5964) to make this a little simpler in CI and containers.
Yeah it definitely is. I'll try to update the documentation soon. |
I have this use case right now; maybe the insight is useful. There are strict requirements only to deploy stable software in the deployment targets. That rules out uv on the deployment targets by our current rules. The devs still want to use uv and uv project management and it is pretty confusing to have the This can be solved by CI/CD but reducing steps and complexity is the signature of uv/ruff for me. |
What makes uv unstable? Thanks for sharing your use-case! Glad you like the tools :) |
SemVer. I do not make the rules sadly. |
I also am finding a need to produce a uv sync --no-dev
uv pip freeze > requirements.txt Then we can check that requirements file against It definitely would be easier to operate directly against the |
+1 to what @jfgordon2 said. I think supporting I have documented one such use case for |
As you mentioned in #6429 , will there be a feature to create a |
Yeah, that would probably be included in the scope of this. |
I'm using this as a make-shift solution for now. uvx --from=yq tomlq -r '.package[]|.name+((.source|" @ "+(.url//"git+\(.git//empty)"))//"==\(.version)")' uv.lock >requirements.txt |
Respect! |
I like the idea of I am curious what are the implications of doing this: uv pip compile pyproject.toml -o requirements.txt In this case is my |
Yeah, the |
## Summary The interface here is intentionally a bit more limited than `uv pip compile`, because we don't want `requirements.txt` to be a system of record -- it's just an export format. So, we don't write annotation comments (i.e., which dependency is requested from which), we don't allow writing extras, etc. It's just a flat list of requirements, with their markers and hashes. Closes #6007. Closes #6668. Closes #6670.
It would be beneficial to me (and I think in general) to be able to generate a
requirements.txt
file from theuv.lock
file. It would be useful for installing requirements without having to resolve dependencies using a different installer in environments whereuv
is not installed, and also for having other tools that don't support theuv.lock
file format (e.g. Dependabot) be able to know the project's pinned dependencies.The text was updated successfully, but these errors were encountered: