Hi! Josselin, Sam, Christopher and glyph, I put you on copy of this mail since I don't know if you are subscribed to this bug. Sorry for any inconvenience.
OoO La nuit ayant déjà recouvert d'encre ce jour du vendredi 25 avril 2008, vers 23:41, [EMAIL PROTECTED] disait: > To be honest I do not fully understand the purpose of python-support; > in particular, the addition of /var/lib/python-support/pythonX.X to > sys.path seems to create a lot of problems like this one and I don't > see what issues it solves. There are already tons of symlinks here; > why not just symlink everything in /var/lib into /usr/lib > appropriately? python-support is a package that helps to ship Python packages for Debian. python-central is another one. python-nevow in Debian uses python-support while python-twisted uses python-central. They use different ways (and paths) for the same goal. The aim of those two packages is to provide the user with compiled python files (.pyc) for each installed python interpreters on their systems. Before those packages exist, each python package was shipped in several packages (one for 2.3, one for 2.4, etc), each version was shipped with .pyc corresponding to a python version. Now, files are compiled when the user installs the package on his system. Now, back to the bug, I could fix it in python-nevow by using python-central in place of python-support. Again, this only fixes it for python-nevow, while there could be other breakages. A proposition from Christopher in a previous mail: ,---- | I can't offer opinions as to in which direction this should be | resolved. I can think of a workaround for this issue in | python-twisted: for example, by patching __init__.py to explicitly | include the python-support twisted/plugins dircetory in __path__. `---- To summarize: - we can fix the problem in python-nevow by using python-central instead of python-support. I am OK with this but this won't fix other potential packages that use python-support and want to ship twisted plugins. - we can fix the problem in python-twisted-core by adding a hack to add /var/lib/python2.X/twisted/plugins to __path__. I attach a naive patch for this (I am not sure this is the best way to achieve this, feel free to propose another patch)
--- twisted-8.0.1/twisted/plugins/__init__.py~ 2007-08-02 14:12:35.000000000 +0200 +++ twisted-8.0.1/twisted/plugins/__init__.py 2008-04-27 18:44:44.000000000 +0200 @@ -12,6 +12,9 @@ @author: U{Glyph Lefkowitz<mailto:[EMAIL PROTECTED]>} """ +import sys from twisted.plugin import pluginPackagePaths __path__.extend(pluginPackagePaths(__name__)) +# Add python-support twisted/plugins directory despite it contains __init__.py +__path__.append("/var/lib/python-support/python%d.%d/twisted/plugins" % sys.version_info[:2]) __all__ = [] # nothing to see here, move along, move along
- python-support could be modified to not use __init__.py for twisted/plugins. I don't know what are the consequences of such a modification Thanks. -- I DID NOT WIN THE NOBEL FART PRIZE I DID NOT WIN THE NOBEL FART PRIZE I DID NOT WIN THE NOBEL FART PRIZE -+- Bart Simpson on chalkboard in episode AABF19
pgpZoikps9Up0.pgp
Description: PGP signature