Hi,

How are you supposed to write a setup.py that installs twistd plugins?

I have this piece of tribal knowledge:

----
from setuptools.command import egg_info

def _top_level(name):
    return name.split('.', 1)[0]

def _hacked_write_toplevel_names(cmd, basename, filename):
    names = map(_top_level, cmd.distribution.iter_distribution_names())
    pkgs = dict.fromkeys(set(names) - set(["twisted"]))
    cmd.write_file("top-level names", filename, '\n'.join(pkgs) + '\n')

egg_info.write_toplevel_names = _hacked_write_toplevel_names
---

But I don't actually know what's actually required, and I don't actually
know where this is documented (if at all). Plus, it looks pretty
unsanitary, and appears to introduce a dependency to setuptools.

So, how am I supposed to do this?

Thanks in advance
lvh
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to