Make pyinfra compatible with uv
#1390
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
uv is a super fast package/project manager.
Some nice things about using are
uv run
arguments (rather than modifyingsetup.py
and recreating venv manually), this even applies to python versionsThat said, the change is sort of orthogonal to uv, in the sense that
pyproject.toml
is a more modern way of describing projects. Ideally everything fromsetup.py
which doesn't need to be dynamic should be in it, at the moment feels like everything could be moved except perhapsget_version_from_changelog
. But for now limiting the scope of PR and just forwarding tosetup.py
viadynamic
property.uv
requirespyproject.toml
, so previously trying to useuv
against pyinfra resulted in:After adding minimal
[project]
section topyproject.toml
,uv
commands run succesfully.Testing: to make sure the change doesn't introduce any visible changes to the package:
3.x
branch and on my branch viapython3 setup.py bdist_wheel
unzip
diff -bur dist_old/ dist_new/
This results in exact match, i.e. all package metadata is unchanged as expected.
3.x
at this time)scripts/dev-test.sh
)scripts/dev-lint.sh
)