Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 274499 - dev-python/PyQt4-4.5.1 error in postinstall
Summary: dev-python/PyQt4-4.5.1 error in postinstall
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-17 12:12 UTC by Robert Piasek (RETIRED)
Modified: 2009-06-20 14:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Piasek (RETIRED) gentoo-dev 2009-06-17 12:12:21 UTC
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
Comment 1 Robert Piasek (RETIRED) gentoo-dev 2009-06-17 12:12:44 UTC
adding python team.
Comment 2 Markos Chandras (RETIRED) gentoo-dev 2009-06-17 14:21:19 UTC
I assume that you have python-2.5

*** This bug has been marked as a duplicate of bug 274210 ***
Comment 3 Davide Pesavento (RETIRED) gentoo-dev 2009-06-17 20:22:33 UTC
Please reopen, I get the same errors with python-2.6.2-r1
Comment 4 Markos Chandras (RETIRED) gentoo-dev 2009-06-17 21:06:46 UTC
I misjudged it sorry
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2009-06-18 09:30:41 UTC
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.
Comment 6 Markos Chandras (RETIRED) gentoo-dev 2009-06-18 12:52:32 UTC
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
Comment 7 Davide Pesavento (RETIRED) gentoo-dev 2009-06-18 14:26:02 UTC
(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?
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-06-20 14:22:52 UTC
Fixed.