[Twisted-Python] Dropin.cache errors after clean installof twisted-8.2.0
Benjamin.Rutt at gs.com
Thu Jun 18 11:09:07 EDT 2009
I installed twisted on linux (RHEL4), solx86 and solsparc using 'python
setup.py install --home=...'.
I looked at ticket 2410. I see that you added a thorough summary of the
problem recently on that ticket - thank you. While I would like to help
if I could, I'm afraid I don't know enough about the python packaging
technical details to be of much use. Was not aware setup.py could not
run arbitrary code at the end. Thanks for the discussion - I'll work
around it as needed via python -c 'from twisted.plugin import IPlugin,
getPlugins; list(getPlugins(IPlugin))' as a post-install hook of my own.
Until a solution emerges, I suppose the INSTALL file in the root of the
distribution could contain this text?
As with other Python packages, the standard way of installing from
python setup.py install
If you install from source you may wish to generate the plugin
cache, post-install, via:
python -c 'from twisted.plugin import IPlugin, getPlugins;
for more details.
Although it would complicate the INSTALL file quite a bit for an
admittedly minor issue. Thanks.
From: twisted-python-bounces at twistedmatrix.com
[mailto:twisted-python-bounces at twistedmatrix.com] On Behalf Of
glyph at divmod.com
Sent: Thursday, June 18, 2009 1:19 AM
To: Twisted general discussion
Subject: Re: [Twisted-Python] Dropin.cache errors after clean installof
On 17 Jun, 07:47 pm, benjamin.rutt at gs.com wrote:
>I recently installed python-2.6.1 and then twisted-8.2.0 (outside of
>python tree). One of my users is complaining that when he uses trial
>test some twisted programs, although his test passes, he has to stare
>a stack trace like this which mentions dropin.cache.new failing to be
How did you install Twisted? What distribution are you using?
>I would consider this to be an install bug. Evidently, trial uses
I would also consider this to be an installer bug.
>Regardless of whether ticket 2409 goes anywhere, should I raise an
>that the install should really take care of initial dropin.cache
>generation, much like python install takes care of std lib .py->.pyc
No need to open a new ticket. Here's the one you're looking for:
It would be very helpful if you would add a patch for this ticket,
though; I'll go so far as to personally volunteer to review it until
it's done if you do.
However, that ticket is somewhat anemic in its description of the
problem. Please be aware that distutils doesn't support post-install
hooks in a general way (it leaves things up to the various 'bdist_'
plugins), so it's hard to do this in a way which is unambiguously
correct. For example, the way post-installation scripts are specified
to bdist_wininst, bdist_rpm, and bdist_msi are all subtly different.
Also, the debian and redhat packages for twisted use 'setup.py install'
but install to a different root, and then have their own custom post-
installation hooks. I'm sure that other packages (gentoo, for example)
probably invoke setup.py as well, in slightly different ways. bdist_egg
doesn't allow for post-installation hooks *at all*, as you can see from
<http://bugs.python.org/setuptools/issue41>. So something that modified
the behavior of setup.py install would have to carefully encapsulate its
post-install hook and only invoke it if appropriate.
If you manage to circumnavigate all this nonsense and produce a nice,
simple post-install hook with some unit tests, you will be a Twisted
Twisted-Python mailing list
Twisted-Python at twistedmatrix.com
More information about the Twisted-Python