Skip to content

Add uv to the list of possible python runners#151993

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
crazazy:uv-support
Feb 4, 2026
Merged

Add uv to the list of possible python runners#151993
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
crazazy:uv-support

Conversation

@crazazy

@crazazy crazazy commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Fixes the unlikely case that one has uv, but not python, globally installed

(It's me, I'm the unlikely case)

I'm one of the rare cases that does have uv, but doesn't have python
installed globally
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Feb 2, 2026
@rustbot

rustbot commented Feb 2, 2026

Copy link
Copy Markdown
Collaborator

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Kivooeo

Kivooeo commented Feb 2, 2026

Copy link
Copy Markdown
Member

isnt uv is like cargo in Rust?

@crazazy

crazazy commented Feb 2, 2026

Copy link
Copy Markdown
Contributor Author

I'd say it's more of a package and version manager, and less of a build system.

@Kivooeo

Kivooeo commented Feb 2, 2026

Copy link
Copy Markdown
Member

but how you can run python on a package manager without actual python being installed?

@crazazy

crazazy commented Feb 2, 2026

Copy link
Copy Markdown
Contributor Author

Well, as I said, it's a version manager. when using uv run, uv will fetch a python interpreter in case you don't have one, and use that to run your python script.

@Mark-Simulacrum

Copy link
Copy Markdown
Member

@rustbot reroll

I'm not sure how I feel about this. I think I'm probably +0 on it but want a second opinion: this probably sets a bit of precedent that we'd accept similar PRs for other toolchain managers, and generally that doesn't seem amazing to me. But maybe it's acceptable and we can re-evaluate if it gets unwieldy.

@rustbot rustbot assigned jieyouxu and unassigned Mark-Simulacrum Feb 2, 2026
@jieyouxu

jieyouxu commented Feb 3, 2026

Copy link
Copy Markdown
Member

I'm also +0 on this... Want to hear a third opinion

Thread: #t-infra/bootstrap > Thoughts on adding uv to possible python runners?

@rustbot rustbot assigned Mark-Simulacrum and unassigned jieyouxu Feb 3, 2026
@jieyouxu jieyouxu assigned jieyouxu and unassigned Mark-Simulacrum Feb 3, 2026

@jieyouxu jieyouxu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I'm okay with "weak accept", in that I'm not really a fan of adding any other toolchain managers that adds yet more complexity to bootstrap.

That being said,

  • I can recognize uv is a widely used python runner (and would definitely not accept if it was a more niche runner), and
  • This PR is only for handling a cascading fallback of trying to find a python runner in ./x specifically.

So I'm okay with accepting for ./x fallback specifically, but I would not want to add any fallback logic for uv in other places in bootstrap, likewise for any other python version managers.

But maybe it's acceptable and we can re-evaluate if it gets unwieldy.

I also agree; if this becomes unwiedly I would be on board with ripping them out.

View changes since this review

@jieyouxu

jieyouxu commented Feb 4, 2026

Copy link
Copy Markdown
Member

Thanks.
@bors r+ rollup

@rust-bors

rust-bors Bot commented Feb 4, 2026

Copy link
Copy Markdown
Contributor

📌 Commit fd023cb has been approved by jieyouxu

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 4, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Feb 4, 2026
Add uv to the list of possible python runners

Fixes the unlikely case that one has uv, but not python, globally installed

(It's me, I'm the unlikely case)
rust-bors Bot pushed a commit that referenced this pull request Feb 4, 2026
…uwer

Rollup of 5 pull requests

Successful merges:

 - #151893 (Move the query list into a new `rustc_middle::queries` module)
 - #152060 (ci: Optimize loongarch64-linux dist builders)
 - #151993 (Add uv to the list of possible python runners)
 - #152047 (Convert to inline diagnostics in `rustc_interface`)
 - #152053 (Avoid semicolon suggestion when tail expr is error)

Failed merges:

 - #152023 (Some `rustc_query_system` cleanups)
@rust-bors rust-bors Bot merged commit a033b66 into rust-lang:main Feb 4, 2026
11 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Feb 4, 2026
rust-timer added a commit that referenced this pull request Feb 4, 2026
Rollup merge of #151993 - crazazy:uv-support, r=jieyouxu

Add uv to the list of possible python runners

Fixes the unlikely case that one has uv, but not python, globally installed

(It's me, I'm the unlikely case)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants