[Twisted-Python] including plugins.tml in a package

Matt Goodall matt at pollenation.net
Mon Aug 16 12:05:12 EDT 2004

On Mon, 2004-08-16 at 15:55, Abe Fettig wrote:
> Hi folks,
> It's come to my attention that my current Hep package for windows 
> (packaged using bdist_win32) doesn't put the plugins.tml file where it 
> should be (under site-packages/hep).  In googling around for a solution, 
> I came across this post:
> http://twistedmatrix.com/pipermail/twisted-python/2002-October/001814.html
> Which describes using an "undocumented hack" in distutils to get the 
> plugins.tml in the right place.  Is that the correct way to do this?
> Thanks,
> Abe

Nevow tinkers with distutils to install a .css in amongst the Python
modules. Here's the config:

        from distutils.command import install
        from distutils.core import setup
        for scheme in install.INSTALL_SCHEMES.values():
            scheme['data'] = scheme['purelib']
            author='Donavon Preston et al',
            author_email='dp at divmod.org',
            description='Web Application Framework',
        #    download_url='http://www.nevow.com/',
            packages=['formless', 'nevow', 'nevow.flat', 'nevow.test'],
                ['formless', ['formless/freeform-default.css']],

I can't remember where that hack came from but all it does is change the
scheme(s) so that data files install to the same base directory as the
Python packages and modules. That's good enough for Nevow but you may
need something smarter.

Cheers, Matt

    /  \__     Matt Goodall, Pollenation Internet Ltd
    \__/  \    w: http://www.pollenation.net
  __/  \__/    e: matt at pollenation.net
 /  \__/  \    t: +44 (0)113 2252500
 \__/  \__/
 /  \          Any views expressed are my own and do not necessarily
 \__/          reflect the views of my employer.

More information about the Twisted-Python mailing list