-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
python: moving it to github; and 2.7 vs 3.4 #353
Comments
I'd probably go with 3.4 as well and yes its most likely that it isn't here because nobody felt compelled enough to become the maintainer. Also I guess we can take it slow and move the python modules one by one. No need to move everything at the same time. Also it would probably be easier if we grant you commit rights here, let me know what you think about that. |
I'll respectfully refuse the commit rights. I sometimes find myself goofing sometimes due to multitasking and not having direct commit-rights helps me not mess up. Thanks |
Fine with me as well. Just wanted to make your life easier, but if you prefer PRs then that's fine as well. |
I would go with Python 3 if we choose one version going forward: Python 2 vs Python 3: http://www.raspberrypi.org/documentation/usage/python/more.md
You will probably need to test each imported library and/or applet to be sure it works with Python 3. I doubt we could just move the existing libraries/applets as is. Even though I am not much of a Python user, I would be happy to help with testing where possible. |
Python 3 is the recommended version for forwardness, and has been for some time. Seems [for OpenWRT] Python is not such a big deal yet, which means that making 3 the default will not be as difficult as I thought initially. As for the libraries we'll see; some of them may not need to be imported, as they're already included [or have equivalents] in Python 3. For most, I hope the library creators did create Python 3 versions, and for the rest, it remains to be seen. First thing to start with, will be the interpreter and we'll work up our way to other libs. Thanks |
Short update. Some commits can be found here : https://github.com/commodo/packages/commits/python-migration I'll have to comb through the files to see which should still be included, and which not. Thanks |
Right. So, I managed to get it working. I also have this commit here: commodo@abab13d A problem I have with the CONFIG_PYTHON_FULL/CONFIG_PYTHONBARE variables, is that it does not seem to update my firmware image if I switch from Bare to Full or vice-versa. At the moment I am trying to evaluate the bloat of the Full installation mode. Thoughts/Considerations if we should leave/add a Full Python build config flag ? |
Try using
Make sure to declare that variable before including package.mk |
At first, thanks for your efforts here. However what reason is there to make this a config option (bare, mid, full) instead of making mid and full separate packages depending on bare + whatever set of .so's and .py files you packaged as python modules? The reason is that external packages are auto-build but different config options aren't. So with your approach you would have exactly one python variant in the repositories with the packages-approach you could choose directly from the binary packages. |
@sbyx Bouncing some these ideas off of you guys helps me decide easier, and stay on track with the whole guidelines. Thanks |
Will reference this pull request : #429 So, python2 is back, and seems to stay around a while longer. Was thinking about how to package python (2 and 3), i.e. what should python-mini(mal) contain (well, at least for python3) My idea is to take a look at the pypi ranking and package python-mini(mal) such that it supports the top 10 packages. If anyone has ideas/thoughts/knowledge, please share. Thanks |
pypi ranking is for external extensions not for the builtin ones. not sure how big the "standard library" of python actually is and what might be worth leaving out in -minimal. Edit: also no need for patch to remove it from oldpackages. I just did that. |
Thanks for removing it from oldpackages :) Well, I said in a message earlier on this thread:
39-40 megs could be a bit much to leave it all in. The idea of looking at external libraries, is to help select which standard libraries get selected into the python-mini(mal) package. |
It would seem that one of the latest updates (since the move from oldpackages) breaks build of Python modules that need to compile C code. The compilation tries to use the host's compiler and therefore generates invalid binaries or fails to compile. This happens at least when building the following package with the latest python (reverting the python package to the old one fixes these issues): https://github.com/wlanslovenija/firmware-packages-opkg/tree/master/lang/python-greenlet |
Will check asap. |
python 2.7.8 seems to also have some missing deps for the ncurses module, says buildbot:
|
Hello, Created this pull request : #445 @hnyman : sbyx told me about it yesterday: #438 Please try again with this update and if all is good, I can probably start to update Thanks |
I can confirm that the new Python package fixes the module build issues. Thanks @commodo! |
@sbyx or @hnyman or @thess So, there would be 2 possible fixes here:
And there would be a 3rd option: to ignore/close the ticket, since the issue is not that big. There are 24 old packages that reference What would you guys recommend ? Thanks |
Ah, just got my answer : https://dev.openwrt.org/ticket/18185#comment:2 |
Seems this package was not yet moved to Github.
I'm guessing it's because nobody wanted to, so far.
I can take maintainership of Python and friends (all Python packages), if nobody else wants to.
I was also thinking of starting a discussion on which version should the default Python version be.
Right now, it's 2.7, but we could look into making 3.4 the version when moving it to Github.
An idea would be to vote on it.
Evidently I'd vote for 3.4, but since I don't have a strong preference for it [other than it's newer and someday going to be the default] I decided to try to put it to a vote.
Thanks
Alex
The text was updated successfully, but these errors were encountered: