[Distutils] simpler distutils.cmd.Command

kost BebiX k.bx at ya.ru
Thu Jan 13 11:45:46 CET 2011

I am really confused about all the setuptools/distutils/distribute/distutils2/easy_install/pip situation, but still have a little frustration about writing your own command for python setup.py your_command_name.

Right now, for example, babel package provides it's command::

    python setup.py extract_messages

To do that, the part::

    extract_messages = babel.messages.frontend:extract_messages

is ok, but what I dislike is the whole::

    from distutils.cmd import Command
    class extract_messages(Command):
        # provide user_options and 3 more function implementations in here

thing. I find it really implicit.

I mean, how do I run the command extract_messages from python? Maybe implementation of command should be that it can be called from regular python code like::



jabber: k.bx at ya.ru

More information about the Distutils-SIG mailing list