Package: python-support Version: 0.1.1 Severity: grave Tags: patch
Coin, The update-python-modules is unsuitable for release and as this package is already quite advertised in Python Teams papers, it MUST be fixed as soon as possible before too many packages are broken, thus the severity. Symlinks for .py files were missing, resulting in import failures. Cleanup was fixed as well. The following patch as been tested with the editobj+py2play+soya+slune suite and the editobj+cerealizer+tofu+soya+balazarbrother suite with success (some of them are to be uploaded soon n the archive). Thanks.
--- /usr/sbin/update-python-modules.orig 2006-04-27 21:40:50.629211816 +0200 +++ /usr/sbin/update-python-modules 2006-04-27 21:51:04.288921360 +0200 @@ -64,16 +64,16 @@ except OSError: pass if file.endswith('.py'): - destpath+='c' - debug("compile "+destpath) + destpath2=destpath+'c' + debug("compile "+destpath2) if py == "python"+sys.version[:3]: - compile(fullpath,destpath) + compile(fullpath,destpath2) else: # D'uh, this one stinks, but it's the only way for non-default # versions - command = 'import py_compile; py_compile.compile("%s","%s")'%(fullpath,destpath) + command = 'import py_compile; py_compile.compile("%s","%s")'%(fullpath,destpath2) os.spawnl(os.P_WAIT, '/usr/bin/'+py, py, '-c', command) - elif not file.endswith('.pyc'): + if not file.endswith('.pyc'): debug("link "+destpath) if os.path.exists(destpath): os.remove(destpath) @@ -85,7 +85,12 @@ for py in py_installed: destpath=os.path.join(basepath,py,dir,file) if file.endswith('.py'): - destpath+='c' + destpath2=destpath+'c' + debug("remove "+destpath2) + try: + os.remove(destpath2) + except OSError: + pass if os.path.exists(destpath): debug("remove "+destpath) os.remove(destpath)
-- Marc Dequènes (Duck)
pgpPBpsJd2PAr.pgp
Description: PGP signature