-
Notifications
You must be signed in to change notification settings - Fork 10
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
Replace uv pip compile/sync/install
to uv lock/lock -U/sync/add
#25
base: main
Are you sure you want to change the base?
Conversation
1f60503
to
c037496
Compare
Makefile
Outdated
@@ -122,25 +122,21 @@ TOOLS := "$(TOOLS) uv" | |||
uv-tooling: | |||
pip install --user uv | |||
uv-import: | |||
cat requirements.txt | |||
cd uv; mkdir -p app; touch app/__init__.py; uv add --frozen -r ../requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not this?
cd uv; uv init; uv add --frozen --requirements ../requirements.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The assumption is that the processing time for generating lock files for cross-platform is affected by the value of requires-python in pyproject.toml.
Therefore, this condition should be aligned in poetry, pdm, and uv.
In the pyproject.toml of poetry and pdm, a condition equivalent to “requires-python>=3.11” is specified.
To generate a similar pyproject.toml with uv init
, you need to run uv init --python 3.11
.
So, the values of requires-python (and also its source) are scattered in pyproject.toml for poetry and pdm, and in Makefile for uv.
I have decided not to use uv init
, because I think it makes maintenance worse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However, it might be better to revise it as follows, as the intention of the implementation may be difficult to convey.
- Add empty file to
uv/app/__init__.py
in the repository - Change the indicated part to
cd uv; uv add --frozen --requirements ../requirements.txt
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it would be more concise to remove the following from pyproject.toml in uv [build-system].
It is the build-backend hatchling that needs init.py.
Therefore, the deletion of [build-system] eliminates the need for init.py.
See #24