[Twisted-Python] How to configure setup.py for a twistd TAP app
exarkun at divmod.com
Thu Dec 20 09:30:11 EST 2007
On Thu, 20 Dec 2007 18:23:44 +1100, Chris Miles <miles.chris at gmail.com> wrote:
>Thanks Jean-Paul, that worked great, with both distutils.core.setup and
>twisted.python.dist.setup. When I used the latter I didn't need to
>regenerate the plugin cache, twistd picked up the new command immediately
>after install. Is this the advantage of twisted.python.dist.setup ?
Not quite. twisted.python.dist is an internal module, not part of Twisted's
public API. Notice this line in its docstring:
API Stability: Unstable. Don't use it outside of Twisted.
>The technique also (mostly) worked using setuptools.setup. twistd picks up
>the new command, but spits out a UserWarning due to the appearance of the
>duplicate twisted package within the egg directory.
>__init__.py:3: UserWarning: Module twisted was already imported from /
>packages/twisted/__init__.pyc, but /Library/Frameworks/
>myproject-0.0.0-py2.4.egg is being added to sys.path
> import pkg_resources
>Usage: twistd [options]
>I'd like to use setuptools, if possible, due to my project's dependencies
>on other setuptools-managed packages, but I can live without it if it's not
>fully compatible with Twisted application plugins.
I'm not really sure what the above warning signifies, whether it indicates
a real problem, or what would be necessary to fix it if so. I know that
setuptools does a number of things which aren't compatible with distutils
and the assumptions of Twisted, though.
More information about the Twisted-Python