I wrote an new ebuild. "Ha," you might say, "earthshattering! What wonderful package might it be?" It's construct, a python module for parsing (mainly binary data). Sadly, the current, brand new release 2.00 is only for python 2.5. Backporting to older python versions is done by a co-author, no roadmap yet. In other words I won't hold my breath till it is in portage, but include it here anyway. QA comments highly appreciated.
Created attachment 106758 [details] dev-python/construct/construct-2.00.ebuild
As far as I see it, there already exists a "backport" to 2.4 - and there seem to be no major changes (quote from the website "Added a "backport" to python 2.4... there was one try-except-finally clause that was incompatible.").
Indeed! Strange, when I tested the ebuild with python 2.4 I got the try-finally-bug, and also some foo = bar if baz else boo expressions. I'm unsure how to go about this, add just the backport as ebuild? Add a python24 use flag? And how to factor in the test use flag? Wah, complexity ;-).
Ha! * Byte compiling python modules for python-2.4 .. ... Compiling /usr/lib/python2.4/site-packages/construct/formats/graphics/bmp.py ... File "/usr/lib/python2.4/site-packages/construct/formats/graphics/bmp.py", line 88 Array(lambda ctx: 2 ** ctx.bpp if ctx.bpp <= 8 else 0, ^ SyntaxError: invalid syntax Compiling /usr/lib/python2.4/site-packages/construct/formats/graphics/bmp.py ... File "/usr/lib/python2.4/site-packages/construct/formats/graphics/bmp.py", line 88 Array(lambda ctx: 2 ** ctx.bpp if ctx.bpp <= 8 else 0, ^ SyntaxError: invalid syntax [ !! ] I remembered correctly. Contacted upstream.
+ 03 Feb 2009; Patrick Lauer <patrick@gentoo.org> +metadata.xml, + +pyconstruct-2.0.0.ebuild: + Initial import. Ebuild by Thomas R. (TRauMa). Closes #161853. So now I'd really appreciate a patch to enable the tests. I think we can safely ignore the py24 backport now. Thanks! (and btw, we don't believe in the gpl v.2+ nonsense. 2 it is :) )
Oh, nice, I totally forgot about this. I think I saw a note on -dev wrt having to call python_needs_rebuild or sth to mark the package for python-updater.