sci-misc/pythoncad-1.36 compilation fails during install and on startup with a syntax error: >>> Installing (1 of 1) sci-misc/pythoncad-1.36 * Compilation and optimization of Python modules for CPython 2.6 ... Compiling //usr/lib/python2.6/site-packages/PythonCAD/Generic/layer.py ... SyntaxError: ('invalid syntax', ('//usr/lib/python2.6/site-packages/PythonCAD/Generic/layer.py', 477, 29, ' def setAutosplit(self, as):\n')) I'm not a Python programmer, but I experimented with this a little. Is 'as' by any chance a reserved word in Python? I ask because simply renaming the variable fixes this problem, as in the patch below: --- layer.py.orig 2006-07-07 11:39:39.000000000 -0400 +++ layer.py 2010-03-09 11:32:59.663820487 -0500 @@ -472,19 +472,19 @@ break else: raise TypeError, "Unexpected type: " + `type(obj)` return (_split, _objs) - def setAutosplit(self, as): + def setAutosplit(self, asp): """Set the autosplit state of the Layer. -setAutosplit(as) +setAutosplit(asp) -Argument 'as' must be a Boolean. +Argument 'asp' must be a Boolean. """ - util.test_boolean(as) - self.__asplit = as + util.test_boolean(asp) + self.__asplit = asp def getAutosplit(self): """Retrieve the autosplit state of the Layer. getAutosplit() It should also be noted that emerge does not detect this failure, and reports successful installation. Reproducible: Always Steps to Reproduce: 1. emerge sci-misc/pythoncad is sufficient. The emerge will fail during installation, but will not report the error.
Further study finds that 'as' is a reserved word (but not enabled by default) in Python 2.5, and is enabled by default from Python 2.6 on.
Fix in CVS with version bump 1.37