OoO En cette soirée bien amorcée  du dimanche 27 avril 2008, vers 22:07,
[EMAIL PROTECTED] disait:

>> 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.

> I think this is really the correct solution; if Twisted is packaged
> one way, then everything that provides plugins for it should be
> packaged the same way.  We assume that this is the case (with
> distutils) in Twisted itself.  In Debian, randomly using different
> paths is a problem.

However, this requires a change in a lot of packages.

>> - 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)

> I do not think that this is a particularly good way to fix the
> issue. Do the unit tests pass when you do it? :) (run "trial
> twisted".)

Well, I get errors:
 [ERROR]: twisted.test.test_failure
 exceptions.ImportError: No module named generator_failure_tests
 [FAIL]: 
twisted.web.test.test_webclient.WebClientTestCase.testDownloadPageError3twisted.trial.unittest.FailTest:
 did not catch an error, instead got None
 [FAIL]: 
twisted.web.test.test_webclient.WebClientSSLTestCase.testDownloadPageError3
 twisted.trial.unittest.FailTest: did not catch an error, instead got None
 [FAIL]: twisted.test.test_plugin.PluginTestCase.test_deployedMode
 twisted.trial.unittest.FailTest: not equal:
 a = 0
 b = 1
 [FAIL]: 
twisted.test.test_plugin.DeveloperSetupTests.test_newPluginsOnReadOnlyPath
 twisted.trial.unittest.FailTest: not equal:
 a = 0
 b = 1
 [FAIL]: twisted.test.test_import.AtLeastImportTestCase.test_test
 exceptions.ImportError: No module named generator_failure_tests

I had  to run trial  as root  because otherwise, I  get a lot  of errors
like this:
 [ERROR]: twisted.trial.test.test_loader.FileTest.test_directory
 exceptions.OSError: [Errno 13] Permission denied: 
'/usr/lib/python2.5/site-packages/twisted/trial/test/goodDirectory'
 [ERROR]: 
twisted.lore.test.test_lore.TestFactory.test_getProcessorWithFilenameGenerator
 exceptions.IOError: [Errno 13] Permission denied: 
'/usr/lib/python2.5/site-packages/twisted/lore/test/simple4.xhtml'
 [ERROR]: twisted.lore.test.test_lore.TestFactory.test_getProcessor
 exceptions.IOError: [Errno 13] Permission denied: 
'/usr/lib/python2.5/site-packages/twisted/lore/test/simple3.xhtml'
 [ERROR]: 
twisted.lore.test.test_lore.TestFactory.test_doFile_withFilenameGenerator
 exceptions.IOError: [Errno 13] Permission denied: 
'/usr/lib/python2.5/site-packages/twisted/lore/test/simple1.xhtml'
 [ERROR]: twisted.lore.test.test_lore.TestFactory.test_doFile
 exceptions.IOError: [Errno 13] Permission denied: 
'/usr/lib/python2.5/site-packages/twisted/lore/test/simple.xhtml'

I  suppose that  test_deployedMode and  test_newPluginsOnReadOnlyPath do
not work as root. Other problems seem to be unrelated.

> However, it's at least a reasonable fix that does not seem like it
> will not introduce many new problems.  One drawback is that this will
> need to be done for every other packages that uses the Twisted plugin
> system on its own package hierarchy, such as Nevow, Axiom, and
> Mantissa.  Simply packaging these libraries the same way would not
> require any special fixes or patches.

There is only two packaging  system for Python in Debian: python-central
and python-support.  This solution is then complete.  Either the plugins
are  in  /var/lib/python-support/python2.X/twisted/plugins, either  they
are in  /usr/lib/site-packages/python2.X/twisted/plugins. Of course, the
user can add  twisted/plugins in other directories, but  in this case, I
think he will arrange to not put __init__.py file in this directory.

I think that this patch is the less invasive change that we can do.
-- 
I WON'T NOT USE NO DOUBLE NEGATIVES
I WON'T NOT USE NO DOUBLE NEGATIVES
I WON'T NOT USE NO DOUBLE NEGATIVES
-+- Bart Simpson on chalkboard in episode BABF02

Attachment: pgpnSP7DltUZk.pgp
Description: PGP signature

Reply via email to