[Twisted-Python] Twisted Plugins - Implementation Discussion

Stephen Thorne stephen at thorne.id.au
Thu Apr 7 01:54:28 EDT 2011


On 2011-04-07, Glyph Lefkowitz wrote:
> 
> On Apr 7, 2011, at 1:38 AM, Stephen Thorne wrote:
> 
> > On 2011-04-07, Glyph Lefkowitz wrote:
> >> Because, frankly, Python installation tools REALLY REALLY SHOULD be
> >> able to install Python files into Python packages.  I'm not sure I can
> >> make any other assertions quite so strongly.  I'm pretty sure that
> >> this is a problem that more than one project is interested in solving.
> >> No other projects are interested in installing '.twistd' files though,
> >> I can assure you of that :).
> > 
> > This is entirely wrong. Python installation tools are barely capable of
> > putting entire existing working python packages into a directory that if
> > you mumble rhymes with "kite smackages".
> 
> This is why I said "should".  Python installation tools are basically
> incapable of anything.  And yet.
> 
> My point is that it's hard enough to advocate for bugs to be fixed in
> installing .py files; let's focus on that, and avoid installing other
> stuff.

Everything has the capability to put datafiles somewhere, even if the
location offset is annoying. In fact, most tools are /better/ at
installing arbitary files that don't have a first line of #!python or
.py extension than files that do.

For this reason, a static configuration file, such as a hand crafted
pickle, an xml file, or an ini file, is a reasonably viable alternative.

I hesitate to suggest it, but a .pth file or a setuptools entrypoint may
be an option here too for inserting plugins without writing to a doubly
nested non-package twisted ''package'' plugins directory.

-- 
Regards,
Stephen Thorne
Development Engineer
Netbox Blue



More information about the Twisted-Python mailing list