[Twisted-Python] plugins.tml and distutils

Kevin Turner acapnotic at twistedmatrix.com
Thu Oct 3 03:13:10 MDT 2002


Ok, so to get my package's plugins.tml installed correctly, I had to put
this in my setup.py::

    from distutils.command.install_data import install_data
    class install_data_twisted(install_data):
        """make sure data files are installed in package.
        this is evil.
        copied from Twisted/setup.py.
        """
        def finalize_options(self):
            self.set_undefined_options('install',
                ('install_lib', 'install_dir')
            )
            install_data.finalize_options(self)

and add this argument to my setup() call:

    cmdclass={'install_data': install_data_twisted}

In summary, to distribute a package using Twisted, I had to cut 'n paste
a hack from a Twisted source file (not one you'll find in an
installation) that fools with underdocumented distutils features which I
don't understand...  and now it's in my code, so I have to deal with it
if its evilness breaks something/is broken.

Not fully having got the swing of distutils yet, I don't really know
what to do about it.  Can we at least have this install_data defined in
twisted.screwwithotherpackages.distutils module or something, so I can
import it instead of pasting it, thus allowing Twisted to maintain it
instead of me?

(ohyeah.  that's in addition to putting plugins.tml in MANIFEST.in *and*
the data_files list.)

Regards,

 - Kevin

-- 
The moon is waning crescent, 16.1% illuminated, 25.6 days old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: </pipermail/twisted-python/attachments/20021003/71baa2a2/attachment.sig>


More information about the Twisted-Python mailing list