Skip to content

Conversation

euclio
Copy link
Contributor

@euclio euclio commented Feb 23, 2019

Before this commit, if you're running x.py directly on a system where
python is symlinked to Python 3, then the python config option will
default to a Python 3 interpreter. This causes debuginfo tests to fail
with an opaque error message, since they have a hard requirement on
Python 2.

This commit modifies the Python probe behavior to look for python2.7 and
python2 before using the interpreter used to execute x.py.

@rust-highfive
Copy link
Contributor

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 23, 2019
@rust-highfive
Copy link
Contributor

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Feb 25, 2019

📌 Commit 1e43666 has been approved by alexcrichton

@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 Feb 25, 2019
Centril added a commit to Centril/rust that referenced this pull request Feb 25, 2019
…hton

look for python2 symlinks before bootstrap python

Before this commit, if you're running x.py directly on a system where
`python` is symlinked to Python 3, then the `python` config option will
default to a Python 3 interpreter. This causes debuginfo tests to fail
with an opaque error message, since they have a hard requirement on
Python 2.

This commit modifies the Python probe behavior to look for python2.7 and
python2 *before* using the interpreter used to execute `x.py`.
@bors
Copy link
Collaborator

bors commented Feb 26, 2019

⌛ Testing commit 1e43666 with merge 349eb440ce6130e6e2a4343ef8e187e4f42948d5...

@bors
Copy link
Collaborator

bors commented Feb 26, 2019

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Feb 26, 2019
@kennytm kennytm added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 26, 2019
@euclio
Copy link
Contributor Author

euclio commented Feb 27, 2019

Spurious network failure.

@alexcrichton
Copy link
Member

Unfortunately I don't think that's spurious, I think that may be LLVM selecting a different (and incompatible) python for its build.

@euclio
Copy link
Contributor Author

euclio commented Feb 27, 2019

I see. I wonder if it's sufficient to blacklist the msys pythons, or to prefer BOOTSTRAP_PYTHON only for msys?

@alexcrichton
Copy link
Member

Yeah I think the issue is that something like the msys python is being used (which is first in PATH) instead of the system python which we prefer (or something like that). I don't personally have a preference for how it's best solved.

@mati865
Copy link
Member

mati865 commented Mar 1, 2019

What about changing shebang to #!/usr/bin/env python2?

@euclio
Copy link
Contributor Author

euclio commented Mar 1, 2019

@mati865 I think that would break ./x.py for MacOS users, since they don't have a python2 symlink by default. python2.7 could potentially work, but it's a little misleading.

@euclio euclio force-pushed the bootstrap-python branch from d8d3173 to a592477 Compare March 1, 2019 20:46
@euclio
Copy link
Contributor Author

euclio commented Mar 1, 2019

Added some debug code to appveyor. Is it possible to run appveyor via try run or do I need an r+?

@mati865
Copy link
Member

mati865 commented Mar 1, 2019

@euclio Appveyor doesn't check try runs but you can run Appveyor build on your fork.

@euclio euclio force-pushed the bootstrap-python branch from a592477 to bd08cc4 Compare March 1, 2019 21:40
@euclio euclio force-pushed the bootstrap-python branch from e910aef to f07317d Compare March 2, 2019 02:01
euclio added 2 commits March 1, 2019 21:27
The old logic would incorrectly look for "python2.exe" when searching
for "python2.7.exe".
Before this commit, if you're running x.py directly on a system where
`python` is symlinked to Python 3, then the `python` config option will
default to a Python 3 interpreter. This causes debuginfo tests to fail
with an opaque error message, since they have a hard requirement on
Python 2.

This commit modifies the Python probe behavior to look for python2.7 and
python2 *before* using the interpreter used to execute `x.py`.
@euclio euclio force-pushed the bootstrap-python branch from f07317d to 12d8a7d Compare March 2, 2019 03:00
@euclio
Copy link
Contributor Author

euclio commented Mar 2, 2019

@alexcrichton Found and fixed a bug in the PATH probing on Windows. Should be ready for another go.

@mati865 Thanks for the help!

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Collaborator

bors commented Mar 4, 2019

📌 Commit 12d8a7d has been approved by alexcrichton

@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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 4, 2019
@bors
Copy link
Collaborator

bors commented Mar 4, 2019

⌛ Testing commit 12d8a7d with merge cc8183b769529e2702c2b352a9285fc0a7e1206d...

@bors
Copy link
Collaborator

bors commented Mar 4, 2019

💔 Test failed - status-appveyor

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 4, 2019
@euclio
Copy link
Contributor Author

euclio commented Mar 4, 2019

Spurious, #58160.

@alexcrichton
Copy link
Member

@bors: retry

@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 Mar 4, 2019
Centril added a commit to Centril/rust that referenced this pull request Mar 9, 2019
…hton

look for python2 symlinks before bootstrap python

Before this commit, if you're running x.py directly on a system where
`python` is symlinked to Python 3, then the `python` config option will
default to a Python 3 interpreter. This causes debuginfo tests to fail
with an opaque error message, since they have a hard requirement on
Python 2.

This commit modifies the Python probe behavior to look for python2.7 and
python2 *before* using the interpreter used to execute `x.py`.
Centril added a commit to Centril/rust that referenced this pull request Mar 9, 2019
…hton

look for python2 symlinks before bootstrap python

Before this commit, if you're running x.py directly on a system where
`python` is symlinked to Python 3, then the `python` config option will
default to a Python 3 interpreter. This causes debuginfo tests to fail
with an opaque error message, since they have a hard requirement on
Python 2.

This commit modifies the Python probe behavior to look for python2.7 and
python2 *before* using the interpreter used to execute `x.py`.
Centril added a commit to Centril/rust that referenced this pull request Mar 9, 2019
…hton

look for python2 symlinks before bootstrap python

Before this commit, if you're running x.py directly on a system where
`python` is symlinked to Python 3, then the `python` config option will
default to a Python 3 interpreter. This causes debuginfo tests to fail
with an opaque error message, since they have a hard requirement on
Python 2.

This commit modifies the Python probe behavior to look for python2.7 and
python2 *before* using the interpreter used to execute `x.py`.
bors added a commit that referenced this pull request Mar 9, 2019
Rollup of 13 pull requests

Successful merges:

 - #58518 (Use early unwraps instead of bubbling up errors just to unwrap in the end)
 - #58626 (rustdoc: add option to calculate "documentation coverage")
 - #58629 (rust-lldb: fix crash when printing empty string)
 - #58660 (MaybeUninit: add read_initialized, add examples)
 - #58670 (fixes #52482)
 - #58676 (look for python2 symlinks before bootstrap python)
 - #58679 (Refactor passes and pass execution to be more parallel)
 - #58750 (Make `Unique::as_ptr`, `NonNull::dangling` and `NonNull::cast` const)
 - #58762 (Mention `unwind(aborts)` in diagnostics for `#[unwind]`)
 - #58924 (Add as_slice() to slice::IterMut and vec::Drain)
 - #58990 (Actually publish miri in the manifest)
 - #59018 (std: Delete a by-definition spuriously failing test)
 - #59045 (Expose new_sub_parser_from_file)

Failed merges:

r? @ghost
@bors bors merged commit 12d8a7d into rust-lang:master Mar 9, 2019
@euclio euclio deleted the bootstrap-python branch March 9, 2019 21:40
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants