-
Notifications
You must be signed in to change notification settings - Fork 179
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
Conversation
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) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for removing these spaces.
Or people on archlinux. |
Does this work on windows? |
Just typed in |
Welp. That's that then. We cannot accept this patch as is. |
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`.
There was a problem hiding this 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
@screamerbg Could you take a look at this patch? I think this is a step in the right direction. |
@bremoran This is great! Thanks for the PR! Could you please confirm that it works in venv as well? @theotherjimmy Yes, I agree! |
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 😄 |
Are we waiting on approval from @tommikas @mazimkhan and @studavekar then? |
I would leave it to be tested in Oulu and Austin. Don't have bandwidth sorry. |
@bremoran Thanks for this! Now going in mbed CLI v1.1 |
@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. |
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