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

Python3 migration #620

Closed
wants to merge 6 commits into from
Closed

Python3 migration #620

wants to merge 6 commits into from

Conversation

sej7278
Copy link
Collaborator

@sej7278 sej7278 commented Nov 14, 2019

Fixes #542

@tuna-f1sh
Copy link
Contributor

Following the discussions in #542 regarding not using macOS system Python, I've done what I suggested and added a python resolution to Common.mk. It is then pre-appended to the ard-reset-arduino scripts.

tuna-f1sh@87d5241

I've merged your changes for Python 3 support too so looks like we finally have fix?!

tuna-f1sh@3241c40

@sej7278
Copy link
Collaborator Author

sej7278 commented Dec 21, 2019

yeah i quite like the PYTHON_CMD, as the way its going we're likely to need to set it for macos, i'm not entirely keen on basically ignoring the shebang on linux, but at this point i've given up a bit!

i was thinking alternatively to just patching the shebang to /usr/bin/python3 as part of debian/fedora packaging and defaulting to /usr/bin/env python

@tuna-f1sh
Copy link
Contributor

I considered this too. I guess the problem with this approach is people using the repository clone.

@happyaron
Copy link

If I understand correctly, /usr/bin/env python will eventually return python3 when the migration is complete at the distro's PoV, so this imposes the program supports both python2/3 and would like to use distro's default.

@tuna-f1sh
Copy link
Contributor

@happyaron if only it were that simple: see #542 (comment); /usr/bin/env python is not allowed in rpm/deb packages, they must be absolute.

@sej7278
Copy link
Collaborator Author

sej7278 commented Jan 22, 2020

so if we use /usr/bin/env python and then just patch it when we build rpm/deb packages, will that work with the various macos implementations?

it'll still work on linux without hardcoding the shebang (git checkout) too.

@tuna-f1sh
Copy link
Contributor

Yes, I think that is actually the simplist/best solution.

@sej7278
Copy link
Collaborator Author

sej7278 commented Jan 22, 2020

ok done - reset to using env python by default and added a sed to the rpm specfile.

will have to think about the debian patch but that's outside of this repo anyway.

@sej7278 sej7278 closed this Aug 4, 2020
@sej7278 sej7278 deleted the python3 branch August 4, 2020 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eventual Python3 migration
3 participants