Skip to content

Conversation

@xSetech
Copy link
Contributor

@xSetech xSetech commented Nov 7, 2025

The python() method was hardcoded to return /usr/bin/python3 on macOS, ignoring the build.python config option. This change respects the config while maintaining the system Python as the default.

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Nov 7, 2025
@xSetech xSetech marked this pull request as ready for review November 7, 2025 08:24
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 7, 2025
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2025

r? @clubby789

rustbot has assigned @clubby789.
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

@xSetech
Copy link
Contributor Author

xSetech commented Nov 7, 2025

I've tested the default is set locally (x86_64-apple-darwin), but it'd be great if a CI job on an *-apple-darwin worker could also confirm.

@jieyouxu
Copy link
Member

jieyouxu commented Nov 7, 2025

@bors try jobs=aarch64-apple

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Nov 7, 2025
bootstrap: respect `build.python` on macOS

try-job: aarch64-apple
@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2025

This PR modifies bootstrap.example.toml.

If appropriate, please update CONFIG_CHANGE_HISTORY in src/bootstrap/src/utils/change_tracker.rs.

@jieyouxu jieyouxu assigned jieyouxu and unassigned clubby789 Nov 7, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

Thanks, @xSetech! I'll r+ once the try job comes back.

View changes since this review

@rust-log-analyzer

This comment has been minimized.

@rust-bors
Copy link

rust-bors bot commented Nov 7, 2025

💔 Test for 37f35bb failed: CI. Failed jobs:

@jieyouxu
Copy link
Member

jieyouxu commented Nov 7, 2025

Curious, I'll take a look tmrw at how they are wired together 🤔

@xSetech
Copy link
Contributor Author

xSetech commented Nov 7, 2025

sanity::check actually picks a Python interpreter before lib::python. It's complicated having more than one place where the interpreter is set, so I'll consolidate the logic that chooses a Python interpreter and refactor. That should fix the latest test result in #148646.

@rust-log-analyzer

This comment has been minimized.

@rustbot rustbot added the A-testsuite Area: The testsuite used to check the correctness of rustc label Nov 7, 2025
@xSetech xSetech requested review from hkBst and jieyouxu November 7, 2025 21:10
@rust-log-analyzer

This comment has been minimized.

@xSetech
Copy link
Contributor Author

xSetech commented Nov 7, 2025

The job tidy failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

Tidy CI job failures were widespread, see:
https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/CI.20keeps.20failing.20because.20of.20npm.20error/with/554424216

@Zalathar
Copy link
Member

Zalathar commented Nov 8, 2025

I wonder how viable it is to change debuginfo tests to use lldb's embedded Python (via the lldb script command), instead of having to coordinate an external Python version that happens to be compatible.

@xSetech
Copy link
Contributor Author

xSetech commented Nov 8, 2025

I wonder how viable it is to change debuginfo tests to use lldb's embedded Python (via the lldb script command), instead of having to coordinate an external Python version that happens to be compatible.

To answer my own question, it seems very viable:

If we can consistently use LLDB's embedded Python, that should make build.python irrelevant to LLDB debuginfo tests.

@Zalathar The embedded interpreter seems like the best option for running the LLDB suite, agreed.

There are other components of the build that use Python, so unless there's an immediate proposal to remove build.python altogether, I think this PR and #148685 are complementary.

@Zalathar
Copy link
Member

Zalathar commented Nov 8, 2025

Right, we still want to respect build.python on macOS.

But the overlap is that if LLDB tests no longer use the configured/discovered Python, then (hopefully) there should be no need for special handling of Python on macOS at all. It might become possible for this PR to removes the special macOS handling, instead of modifying and moving it.

@jieyouxu
Copy link
Member

jieyouxu commented Nov 9, 2025

I'm looking at the other PR first. If that seems to work, then we can land that and then have this PR remove the *-apple-darwin special case.
@rustbot blocked (#148685)

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 9, 2025
The `python()` method was hardcoded to return `/usr/bin/python3` on
macOS, ignoring the `build.python` config option. This change respects
the config and removes the macOS-specific default.
@xSetech xSetech force-pushed the boostrap/set-python-on-macos branch from 3904658 to a726de2 Compare November 10, 2025 21:28
@rustbot
Copy link
Collaborator

rustbot commented Nov 10, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@xSetech
Copy link
Contributor Author

xSetech commented Nov 10, 2025

Rebased and removed both the special handling for macOS and related mentions of LLDB.

@jieyouxu jieyouxu added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Nov 11, 2025
Copy link
Member

@jieyouxu jieyouxu left a comment

Choose a reason for hiding this comment

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

@jieyouxu
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 11, 2025

📌 Commit 191a3e3 has been approved by jieyouxu

It is now in the queue for this repository.

@bors bors 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 Nov 11, 2025
@jieyouxu
Copy link
Member

@bors rollup

Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 11, 2025
…os, r=jieyouxu

bootstrap: respect `build.python` on macOS

The `python()` method was hardcoded to return `/usr/bin/python3` on macOS, ignoring the `build.python` config option. This change respects the config while maintaining the system Python as the default.
Zalathar added a commit to Zalathar/rust that referenced this pull request Nov 11, 2025
…os, r=jieyouxu

bootstrap: respect `build.python` on macOS

The `python()` method was hardcoded to return `/usr/bin/python3` on macOS, ignoring the `build.python` config option. This change respects the config while maintaining the system Python as the default.
bors added a commit that referenced this pull request Nov 11, 2025
Rollup of 16 pull requests

Successful merges:

 - #141470 (Add new `function_casts_as_integer` lint)
 - #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
 - #146495 (rustdoc: Erase `#![doc(document_private_items)]`)
 - #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
 - #147833 (rustdoc-json: move `target` to `json::conversions`)
 - #147952 (Add a timeout to the `remote-test-client` connection)
 - #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
 - #148480 (Add `Steal::risky_hack_borrow_mut`)
 - #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
 - #148508 (Provide more context when mutably borrowing an imutably borrowed value)
 - #148530 (update the bootstrap readme)
 - #148608 (Add test for --test-builder success path)
 - #148636 (bootstrap: respect `build.python` on macOS)
 - #148639 (test(rustdoc): move tests into jump-to-def)
 - #148647 (Check unsafety for non-macro attributes in `validate_attr`)
 - #148667 (a few small clippy fixes)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Nov 11, 2025
Rollup of 16 pull requests

Successful merges:

 - #141470 (Add new `function_casts_as_integer` lint)
 - #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
 - #146495 (rustdoc: Erase `#![doc(document_private_items)]`)
 - #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
 - #147833 (rustdoc-json: move `target` to `json::conversions`)
 - #147952 (Add a timeout to the `remote-test-client` connection)
 - #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
 - #148480 (Add `Steal::risky_hack_borrow_mut`)
 - #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
 - #148508 (Provide more context when mutably borrowing an imutably borrowed value)
 - #148530 (update the bootstrap readme)
 - #148608 (Add test for --test-builder success path)
 - #148636 (bootstrap: respect `build.python` on macOS)
 - #148639 (test(rustdoc): move tests into jump-to-def)
 - #148647 (Check unsafety for non-macro attributes in `validate_attr`)
 - #148667 (a few small clippy fixes)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit that referenced this pull request Nov 11, 2025
Rollup of 15 pull requests

Successful merges:

 - #141470 (Add new `function_casts_as_integer` lint)
 - #143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
 - #146495 (rustdoc: Erase `#![doc(document_private_items)]`)
 - #147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
 - #147833 (rustdoc-json: move `target` to `json::conversions`)
 - #147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
 - #148480 (Add `Steal::risky_hack_borrow_mut`)
 - #148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
 - #148508 (Provide more context when mutably borrowing an imutably borrowed value)
 - #148530 (update the bootstrap readme)
 - #148608 (Add test for --test-builder success path)
 - #148636 (bootstrap: respect `build.python` on macOS)
 - #148639 (test(rustdoc): move tests into jump-to-def)
 - #148647 (Check unsafety for non-macro attributes in `validate_attr`)
 - #148667 (a few small clippy fixes)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit e8404e4 into rust-lang:main Nov 11, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 11, 2025
rust-timer added a commit that referenced this pull request Nov 11, 2025
Rollup merge of #148636 - xSetech:boostrap/set-python-on-macos, r=jieyouxu

bootstrap: respect `build.python` on macOS

The `python()` method was hardcoded to return `/usr/bin/python3` on macOS, ignoring the `build.python` config option. This change respects the config while maintaining the system Python as the default.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Nov 12, 2025
Rollup of 15 pull requests

Successful merges:

 - rust-lang/rust#141470 (Add new `function_casts_as_integer` lint)
 - rust-lang/rust#143619 (`c_variadic`: Add future-incompatibility warning for `...` arguments without a pattern outside of `extern` blocks)
 - rust-lang/rust#146495 (rustdoc: Erase `#![doc(document_private_items)]`)
 - rust-lang/rust#147771 (Rename `*exact_{div,shr,shl}` to `*{div,shr,shl}_exact`)
 - rust-lang/rust#147833 (rustdoc-json: move `target` to `json::conversions`)
 - rust-lang/rust#147955 (compiletest: Migrate `TestProps` directive handling to a system of named handlers)
 - rust-lang/rust#148480 (Add `Steal::risky_hack_borrow_mut`)
 - rust-lang/rust#148506 (Special case detecting `'static` lifetime requirement coming from `-> Box<dyn Trait>`)
 - rust-lang/rust#148508 (Provide more context when mutably borrowing an imutably borrowed value)
 - rust-lang/rust#148530 (update the bootstrap readme)
 - rust-lang/rust#148608 (Add test for --test-builder success path)
 - rust-lang/rust#148636 (bootstrap: respect `build.python` on macOS)
 - rust-lang/rust#148639 (test(rustdoc): move tests into jump-to-def)
 - rust-lang/rust#148647 (Check unsafety for non-macro attributes in `validate_attr`)
 - rust-lang/rust#148667 (a few small clippy fixes)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-testsuite Area: The testsuite used to check the correctness of rustc 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.

8 participants