FS#12004 - __init__.pyc still left in python2.5 dir, while pyqt is using python2.6 now (bad magic number error)
Attached to Project:
Arch Linux
Opened by Johannes Dewender (JonnyJD) - Wednesday, 05 November 2008, 17:34 GMT
Last edited by Allan McRae (Allan) - Tuesday, 18 November 2008, 04:07 GMT
Opened by Johannes Dewender (JonnyJD) - Wednesday, 05 November 2008, 17:34 GMT
Last edited by Allan McRae (Allan) - Tuesday, 18 November 2008, 04:07 GMT
|
Details
Description:
pyqt-4.4.3-2 is using the site-package directory /usr/lib/python2.6/site-packages in /usr/lib/python2.6/site-packages/PyQt4 is a compiled __init__.pyc left from the old version, which is not deleted. This leads to this type of error in packages depending on pyqt: Traceback (most recent call last): File "/usr/bin/picard", line 2, in <module> from picard.tagger import main; main('/usr/share/locale', True) File "/usr/lib/python2.6/site-packages/picard/tagger.py", line 21, in <module> from PyQt4 import QtGui, QtCore ImportError: Bad magic number in /usr/lib/python2.5/site-packages/PyQt4/__init__.pyc This is also reported for other programs in http://bbs.archlinux.org/viewtopic.php?id=58278 http://bbs.archlinux.org/viewtopic.php?id=58320 Additional info: pyqt-4.4.3-2 picard-0.10-2 Steps to reproduce: Install a version of pyqt using python2.5 (pyqt-4.4.3-1 works) and python 2.5. Open the program using pyqt, so it compiles to a .pyc Update pyqt. Now you have the __init__.pyc still in the old directory and the wrong PyQt4 is loaded. The fix would be to delete the .pyc while upgrading pyQt. I have no clue how/if this is done in other packages, but other packages might also be affected. |
This task depends upon
Comment by Allan McRae (Allan) -
Saturday, 08 November 2008, 20:45 GMT
Comment by Allan McRae (Allan) -
Tuesday, 18 November 2008, 04:07 GMT
This is not the only package leaving such a file behind. Maybe we
need to get a better python packaging policy to deal with this
problem.
I am going to close this as deleting the file is a simple solution
for the meantime. I am working on a python packaging policy that
will address these issues.