Skip to content
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

Pass path to python from bootstrap.py to bootstrap.rs #42805

Merged
merged 1 commit into from
Jun 22, 2017

Conversation

stepancheg
Copy link
Contributor

@stepancheg stepancheg commented Jun 21, 2017

When bootstrap is executed with python not in $PATH, (e. g.
c:\Python27\python.exe x.py test) bootstrap cannot find python
and crashes.

This commit passes path to python in BOOTSTRAP_PYTHON env var.

Fixes #41647.

When bootstrap is executed with python not in `$PATH`, (e. g.
`c:\Python27\python.exe x.py test`) bootstrap cannot find python
and crashes.

This commit passes path to python in `BOOTSTRAP_PYTHON` env var.
@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

match env::var("BOOTSTRAP_PYTHON") {
Ok(v) => build.config.python = Some(PathBuf::from(v)),
Err(env::VarError::NotPresent) => {}
Err(e) => panic!("BOOTSTRAP_PYTHON var is incorrect: {:?}", e),
Copy link
Member

Choose a reason for hiding this comment

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

I don't think there's any reason for us to use env::var (that is, invalid UTF-8 for the python path seems fine -- we store a PathBuf). That should make this case impossible, I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, thanks! I've updated the PR.

@Mark-Simulacrum
Copy link
Member

This looks good to me, but r? @alexcrichton

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Jun 21, 2017

📌 Commit f441e07 has been approved by alexcrichton

@Mark-Simulacrum
Copy link
Member

@bors rollup

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Jun 22, 2017
…ichton

Pass path to python from bootstrap.py to bootstrap.rs

When bootstrap is executed with python not in `$PATH`, (e. g.
`c:\Python27\python.exe x.py test`) bootstrap cannot find python
and crashes.

This commit passes path to python in `BOOTSTRAP_PYTHON` env var.
frewsxcv added a commit to frewsxcv/rust that referenced this pull request Jun 22, 2017
…ichton

Pass path to python from bootstrap.py to bootstrap.rs

When bootstrap is executed with python not in `$PATH`, (e. g.
`c:\Python27\python.exe x.py test`) bootstrap cannot find python
and crashes.

This commit passes path to python in `BOOTSTRAP_PYTHON` env var.
Mark-Simulacrum added a commit to Mark-Simulacrum/rust that referenced this pull request Jun 22, 2017
…ichton

Pass path to python from bootstrap.py to bootstrap.rs

When bootstrap is executed with python not in `$PATH`, (e. g.
`c:\Python27\python.exe x.py test`) bootstrap cannot find python
and crashes.

This commit passes path to python in `BOOTSTRAP_PYTHON` env var.
bors added a commit that referenced this pull request Jun 22, 2017
Rollup of 4 pull requests

- Successful merges: #42799, #42804, #42805, #42806
- Failed merges:
@alexcrichton alexcrichton added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Jun 22, 2017
@bors bors merged commit f441e07 into rust-lang:master Jun 22, 2017
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.

6 participants