Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

configure: require Python 2.7 #31640

Merged
merged 1 commit into from
Feb 15, 2016
Merged

Conversation

hanna-kruppe
Copy link
Contributor

In other words, enforce what was documented in #30626 (and also stop blaming it on LLVM, we have at least one Python script of our own).

Also, there is no Python later than 2.7 and there never will be.

@rust-highfive
Copy link
Collaborator

r? @nikomatsakis

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

fi

python_version=$($CFG_PYTHON -V 2>&1)
if [ $(echo $python_version | grep -c '^Python 2\.[4567]') -ne 1 ]; then
err "Found $python_version, but LLVM requires Python 2.4-2.7"
if [ $(echo $python_version | grep -c '^Python 2.7') -ne 1 ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is deliberately as conservative as possible. It might be possible to write it more elegantly now that a single fixed string is expected, but I am afraid of breaking things. I tested it locally and it seems to work, but I am a shell noob.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that you should escape the . (like in the old code) and match against '^Python 2\.7', otherwise the test will also accept strings like Python 217 (which is probably not going to be a problem ever)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, derp. Fixed.

In other words, enforce what was documented in rust-lang#30626 (and also stop blaming it on LLVM, we have at least one Python script of our own).

Also, there is no Python later than 2.7 and there never will be.
@sanxiyn
Copy link
Member

sanxiyn commented Feb 15, 2016

@bors r+

@bors
Copy link
Contributor

bors commented Feb 15, 2016

📌 Commit 999051d has been approved by sanxiyn

@bors
Copy link
Contributor

bors commented Feb 15, 2016

⌛ Testing commit 999051d with merge 3a254fe...

bors added a commit that referenced this pull request Feb 15, 2016
In other words, enforce what was documented in #30626 (and also stop blaming it on LLVM, we have at least one Python script of our own).

Also, there is no Python later than 2.7 and there never will be.
@bors bors merged commit 999051d into rust-lang:master Feb 15, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants