Skip to content
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

Question: How to use uv with poetry on CI? #1634

Closed
Warchant opened this issue Feb 18, 2024 · 5 comments
Closed

Question: How to use uv with poetry on CI? #1634

Warchant opened this issue Feb 18, 2024 · 5 comments
Labels
question Asking for clarification or support

Comments

@Warchant
Copy link

Is it possible to use uv to speed-up poetry install on CI?

@Warchant Warchant changed the title Question: How to use with poetry? Question: How to use uv with poetry on CI? Feb 18, 2024
@woutervh
Copy link

for now:

poetry export > requirements.txt
uv venv
uv pip install -r requirements
poetry install

@zanieb
Copy link
Member

zanieb commented Feb 18, 2024

We'd need to add support for reading Poetry's dependency format, I'm not sure if we will.

Related:

@zanieb zanieb added the question Asking for clarification or support label Feb 18, 2024
@Warchant
Copy link
Author

Warchant commented Feb 18, 2024

for now:

poetry export > requirements.txt
uv venv
uv pip install -r requirements
poetry install

This works, but poetry export > requirements.txt creates UTF16-LE file, while uv pip install -r requirements.txt expects UTF-8, so I manually need to re-save it in UTF8. It is not a problem, but would be cool if uv would detect input file encoding...

uv pip install -r .\requirements.txt
error: failed to read from file `.\requirements.txt`
  Caused by: stream did not contain valid UTF-8

@Secrus
Copy link

Secrus commented Feb 19, 2024

for now:

poetry export > requirements.txt
uv venv
uv pip install -r requirements
poetry install

Do not redirect stream from poetry export, use -o flag to specify output file (it properly handles user messages and the actual dependency output).

@zanieb
Copy link
Member

zanieb commented Mar 25, 2024

As of #2633 we support reading this directly.

@zanieb zanieb closed this as completed Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for clarification or support
Projects
None yet
Development

No branches or pull requests

4 participants