Skip to content

Conversation

@brenorb
Copy link

@brenorb brenorb commented Nov 22, 2025

Description

Alter the scripts for preferring uv over pip, if it's available. Also tries pip3 if pip is not available.
uv is the modern way to manage dependencies on python, it's faster than the alternatives and written on rust.
Closes #26

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
    [ ] I ran cargo fmt and cargo clippy before committing

@reez
Copy link
Collaborator

reez commented Nov 24, 2025

@mg-twentyone @andreasgriffin as users/contributors do you have any feedback/preferences on this?

@brenorb
Copy link
Author

brenorb commented Nov 24, 2025

This failed test will pass once #28 is merged, it's just that problem with python version.

@mg-twentyone
Copy link
Contributor

@mg-twentyone @andreasgriffin as users/contributors do you have any feedback/preferences on this?

first of all, thanks @brenorb for your PR.

uv is an interesting tool that is faster than pip for package installation and dependency resolution. It's also written in Rust, making it a good fit with UniFFI bindings from Rust lib. Additionally, it allows for more centralized dependency management using project.toml.
However, as @thunderbiscuit explains here, this is not a standard Python project. In this specific case, our bottleneck (in terms of speed) is likely the Rust compilation rather than Python package installation, so this improvement may have a non-significant impact compared to the time spent building the Rust bindings.

Anyway, imho this is not the right approach to switch from pip to uv for the following reasons:

  1. using an hybrid approach increases complexity, as we would need to manage and maintain both cases.
  2. IMPORTANT: uv add is not just an installer; it's a project manager. Using uv add reads requirements.txt and modifies the pyproject.toml file to include these dependencies. Furthermore, we also use generate scripts in ci/cd , which can result in a "dirty" git state (and maybe in the pipeline failure).

To summarize, imho if we want to consider this switch, we should carefully analyze all the implications and try to implement it in a more consistent way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update scripts to use uv

3 participants