Skip to content

Do not assume that python means python2 #470

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

Merged
merged 3 commits into from
Apr 12, 2017
Merged

Conversation

bremoran
Copy link
Contributor

mbed-cli cannot assume that the system has python2 installed as python. This causes breakage for developers who have installed python3 prior to python2.

cc @screamerbg

bremoran and others added 2 commits March 30, 2017 20:32
mbed-cli cannot assume that the system has python2 installed as python. This causes breakage for developers who have installed python3 prior to python2.
This commit ensures that all calls to python are explicitly python2
@@ -916,7 +916,7 @@ def fromrepo(cls, path=None):

repo.path = os.path.abspath(path)
repo.name = os.path.basename(repo.path)

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 for removing these spaces.

@theotherjimmy
Copy link
Contributor

Or people on archlinux.

@theotherjimmy
Copy link
Contributor

Does this work on windows?

@bridadan
Copy link
Contributor

Just typed in python2 into my windows command prompt and it didn't bring anything up :/ I'm on 2.7.11

@theotherjimmy
Copy link
Contributor

Welp. That's that then. We cannot accept this patch as is.

@bremoran
Copy link
Contributor Author

I didn't realize that python installers on windows don't populate python2 and python3.

This reads the python interpreter’s path and executes any other scripts
using the same interpreter. This way, mbed CLI is guaranteed to execute
subscripts in `python2`, rather than the system default `python`.
Copy link
Contributor

@theotherjimmy theotherjimmy left a comment

Choose a reason for hiding this comment

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

I think that'll work cross-plaftorm

@theotherjimmy
Copy link
Contributor

@screamerbg Could you take a look at this patch? I think this is a step in the right direction.

@screamerbg
Copy link
Contributor

@bremoran This is great! Thanks for the PR! Could you please confirm that it works in venv as well?

@theotherjimmy Yes, I agree!

@bridadan
Copy link
Contributor

bridadan commented Apr 4, 2017

Before this gets released, it may be a good idea to let all the CI teams try out a release branch before putting this out in the wild. Specifically @tommikas, @mazimkhan, and @studavekar probably care about this 😄

@theotherjimmy
Copy link
Contributor

Are we waiting on approval from @tommikas @mazimkhan and @studavekar then?

@mazimkhan
Copy link

mazimkhan commented Apr 7, 2017

I would leave it to be tested in Oulu and Austin. Don't have bandwidth sorry.

@screamerbg
Copy link
Contributor

@bremoran Thanks for this! Now going in mbed CLI v1.1

@screamerbg screamerbg merged commit a445a8a into ARMmbed:master Apr 12, 2017
@bridadan
Copy link
Contributor

@screamerbg Do we have a timeline for the 1.1 release? I think I'd like to get this into the Austin CI at some point beforehand just to do a bit of soak testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants