|Summary:||x11-plugins/screenlets-0.1.2 does not work with python3|
|Product:||Gentoo Linux||Reporter:||Nils Andresen <nils>|
|Component:||Current packages||Assignee:||Desktop Misc. Team <desktop-misc>|
|Package list:||Runtime testing required:||---|
epatch for direct python calls
Description Nils Andresen 2013-01-17 11:09:02 UTC
on a python3-system it is impossible to add screenlets from the screenlet-manager. Switching to python2 solves the problem. Reproducible: Always Steps to Reproduce: 1. run eselect python set 2 # if No. 2 is a python3 interpreter 2. run screenlets-manager 3. try to add any screenlet Most fail with "SyntaxError: invalid syntax" because of some "print" statement.
Comment 1 Nils Andresen 2013-01-17 11:16:55 UTC
Not directly caus of this problem but connected: If you look at line 866 of /usr/share/screenlets-manager/screenlets-manager.py (this is the creation of an auto-start screenlet) the EXEC is "python -u %s/%sScreenlet.py" IMHO this line should say "python2 -u %s/%sScreenlet.py"
Comment 2 Nils Andresen 2013-01-17 12:33:34 UTC
Created attachment 335902 [details, diff] epatch for direct python calls The attached patch fixes the problem for me by replacing all (well, all I could find anyway) direct calls to "python" by calls to "python2".
Comment 3 Jeroen Roovers 2013-01-17 16:16:50 UTC
euscan reports that 0.1.5 is available. HOMEPAGE appears hard to access right now.
Comment 4 Jeroen Roovers 2013-01-17 16:33:50 UTC
Created attachment 335922 [details, diff] screenlets-0.1.5.ebuild.patch Would this do?
Comment 5 Jeroen Roovers 2013-01-17 16:37:39 UTC
Oh, according to https://launchpad.net/screenlets version 0.1.6 is available now. :)
Comment 6 Nils Andresen 2013-01-17 17:25:48 UTC
(In reply to comment #4) Short answer: No :-) Long answer: Kinda... You did multiple thing in that patch, which don't work together... The line: "sed -i $(find src/ -type f) -e 's|exec python|&2|g;s|python -u|python2 -u|g' || die" works nicely in the 0.1.2 ebuild, thanks for that. But you also bumped.. and 0.1.5 seems to depend on dev-python/beautifulsoup-3. After installing that, too I could start screenlets-manager, however all screenslets were gone...
Comment 7 Nils Andresen 2013-01-17 17:38:13 UTC
Hmm. Seems like all screenlets now reside in [https://launchpad.net/indiv-screenlets] So possibly adding the dependency to beautifulsoup is all that's missing. And a new ebuild for the individual-screenlets ;-)
Comment 8 Nils Andresen 2013-01-18 10:16:15 UTC
Created attachment 336034 [details, diff] screenlets-0.1.6.ebuild.patch The screenlets-0.1.6.ebuild.patch has the correct dependency. However, default screenlets are no longer part of the package.
Comment 9 Jeroen Roovers 2013-06-01 13:45:48 UTC
Fixed in 0.1.6. Thanks for the patch. It was helpful in migrating to the -r1 eclasses.