byte compiling during postinstall reports some errors: >>> Starting pkg_postinst * Byte compiling python modules for python-2.6 .. ... Compiling //usr/lib64/python2.6/site-packages/PyQt4/uic/port_v3/proxy_base.py ... SyntaxError: ('invalid syntax', ('//usr/lib64/python2.6/site-packages/PyQt4/uic/port_v3/proxy_base.py', 4, 26, 'class ProxyBase(metaclass=ProxyType):\n')) Compiling //usr/lib64/python2.6/site-packages/PyQt4/uic/port_v3/proxy_base.py ... SyntaxError: ('invalid syntax', ('//usr/lib64/python2.6/site-packages/PyQt4/uic/port_v3/proxy_base.py', 4, 26, 'class ProxyBase(metaclass=ProxyType):\n')) I've got dev-lang/python-2.6.2-r1 installed Reproducible: Always
adding python team.
I assume that you have python-2.5 *** This bug has been marked as a duplicate of bug 274210 ***
Please reopen, I get the same errors with python-2.6.2-r1
I misjudged it sorry
PyQt4-4.5.1 installs both port_v2 (for python < 3.0) and port_v3 (for python >= 3.0) and switches between them at runtime. python_mod_optimize tries to compile both versions, but obviously fails to recognize port_v3's syntax as valid. Having both versions installed seems redundant, since a recompile of PyQt4 would probably be needed anyway when upgrading to a different python version. We could workaround by removing port_v2 or port_v3 in src_install(), but someone should talk with upstream about this IMHO.
I would accept a proposed patch for disabling port_vX code according to python version. Remember that in case both 2.X and 3.0 python are present, the patch should not do anything at all Of course contacting upstream would be nice so that this patch should be included internally
(In reply to comment #6) > I would accept a proposed patch for disabling port_vX code according to python > version. Remember that in case both 2.X and 3.0 python are present, the patch > should not do anything at all Mh? We only install stuff for one python version, everything is based on $PYVER (sitedir, etc....) Am I missing something?
Fixed.