-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On MacOS, bootstrap requires both python
and python3
#95204
Comments
But not everyone will want to run lldb, right? We only mention /usr/bin/python3 there, we don't actually run it unless lldb tests are run, which is pretty rare. This may still be an OK change, of course. |
Sure - but in that case, we hardly need python at all, only for rustdoc tests, and it seems ok to use the system python. |
I would actually support requiring Python 3 in any case. |
@rustbot claim |
If I understand the issue here correctly, just moving the check from test.rs to the |
The former - it should just use |
About to raise a PR, but is it even necessary to perform any check in Also first time using |
I don't think it's necessary to check in both places, no, you can return /usr/bin/python3 unconditionally in builder.python(). Whether you can remove the check in sanity.rs is a question for @Mark-Simulacrum - I think probably yes, since you can still run the build without python, but it doesn't necessarily need to go in the same change switching to /bin/python3 consistently.
Basically everything runs the check in sanity.rs, but I think it's only relevant when BOOTSTRAP_PYTHON is unset, so probably you'll need |
If we can rely on /usr/bin/python3 always existing on macOS there's no need to check for it, but I would expect that the code in sanity.rs isn't platform-specific and so should continue to look for python in a variety of ways (likely the same ways across all platforms). It looks like python is currently used for two separate things: lldb tests, and docck. The latter likely works with python 2 and python 3, or at least, so it's likely that we need to leave the discovery and configuration in place. Certainly on e.g. Windows /usr/bin/python3 is not expected to exist, I believe. |
…rk-Simulacrum Always use system `python3` on MacOS This PR includes 2 changes: 1. Always use the system Python found at `/usr/bin/python3` on MacOS 2. Removes the hard requirement on having `python` in your system path if you didn't specify alternatives. The proposed change will instead attempt to find and use in order: `python` -> `python3` -> `python2`. This change isn't strictly necessary but without any change to this check, the original issue inspiring this change will still exist. Fixes rust-lang#95204 r? `@jyn514`
…rk-Simulacrum Always use system `python3` on MacOS This PR includes 2 changes: 1. Always use the system Python found at `/usr/bin/python3` on MacOS 2. Removes the hard requirement on having `python` in your system path if you didn't specify alternatives. The proposed change will instead attempt to find and use in order: `python` -> `python3` -> `python2`. This change isn't strictly necessary but without any change to this check, the original issue inspiring this change will still exist. Fixes rust-lang#95204 r? ``@jyn514``
python: https://github.com/rust-lang/rust/blob/beb480d908f091e7c42c866e13641f26b2ee230b/src/bootstrap/sanity.rs#L100-L106
python3: https://github.com/rust-lang/rust/blob/beb480d908f091e7c42c866e13641f26b2ee230b/src/bootstrap/test.rs#L1382-L1386
It sounds like python3 is strictly required for LLDB, so we should move this check from test.rs to
builder.python()
, which will only requirepython3
instead of both commands.cc @Walther
@rustbot label: +E-easy +E-mentor +E-help-wanted +A-rustbuild +A-contributor-roadblock
The text was updated successfully, but these errors were encountered: