Skip to content

Adding support for uv package manager - #6354

Open
rdavidm42 wants to merge 9 commits into
ArchipelagoMW:mainfrom
rdavidm42:feature-uv-support
Open

Adding support for uv package manager#6354
rdavidm42 wants to merge 9 commits into
ArchipelagoMW:mainfrom
rdavidm42:feature-uv-support

Conversation

@rdavidm42

Copy link
Copy Markdown

What is this fixing or adding?

This pull request adds support for uv, a Python package manager written in Rust that is often considerably faster than standard pip installs. Support for pip is fully maintained, both ModuleUpdate.py and setup.py will automatically fall back to pip if uv is not installed.

An additional advantage when using uv is that running setup.py to create executables no longer requires manually creating or managing a virtual environment. Instead, uv automatically manages a temporary virtual environment on the fly to run the files and builds. This makes creating apps or executables for users with less Python experience significantly more streamlined, allowing the app to be compiled with a single terminal command.

In principle, running files other than setup.py can also be done without a virtual environment, though I did not test it explicitly. If running the various Python files from source is desired, then a virtual environment is still recommended.

How was this tested?

I tested compilation of the source files with this new code on macOS Tahoe 26.5.2, Windows 11 25H2, and Kubuntu 26.04. On the Mac system, the app was successfully built and functioned identically to the main branch version. On Windows and Kubuntu, binaries were built and also tested successfully.

If this makes graphical changes, please attach screenshots.

No graphical changes made

@github-actions github-actions Bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Jul 27, 2026
@duckboycool duckboycool added the is: enhancement Issues requesting new features or pull requests implementing new features. label Jul 27, 2026
@qwint

qwint commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

this seems like the wrong way to use uv,

  • on a new machine I install uv
  • clone ap
  • run uv run Launcher.py
  • hit enter to install requirements,
  • I can now run the system-wide python Launcher.py without any missing requirements

at minimum this should remove break-system-packages, uv users can simply run uv venv to make a venv that will be automatically picked up, making the user experience the same

but there is also probably a smarter way to utilize uv, ex. one that uses --with-requirements on all the requirements files that ModuleUpdate would normally collect, or one that sets up a pyproject/uv.toml file (though i'm not sure how the toml files would grab world requirements)

@rdavidm42

Copy link
Copy Markdown
Author

Thanks for the feedback! My initial approach to implementing uv here was meant to be as a fairly conservative, drop in replacement for pip. While this doesn't make use of all of the advantages of uv, it does ensure that the workflow stays the same for both pip and uv without overhauling how dependencies are handled throughout the project.

That said, I agree with removing break-system-packages to ensure that uv targets the venv, and have done so. I'm also willing to determine how to implement uv into the project on a deeper level if there is interest in modernizing the package management.

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

Labels

affects: core Issues/PRs that touch core and may need additional validation. is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants