def _hacked_write_toplevel_names(cmd, basename, filename):
    pkgs = dict.fromkeys([_top_level_package(k) for k in cmd.distribution.
        iter_distribution_names() if _top_level_package(k) != 'twisted'])
How do I write a setup.py for a twistd/twisted plugin that works with setuptools, distribute, etc?