[Distutils] using sub_commands in distutils

Manlio Perillo manlio_perillo at libero.it
Fri May 14 18:10:42 CEST 2010

P.J. Eby ha scritto:
> At 05:53 PM 5/14/2010 +0200, Manlio Perillo wrote:
>> By the way: in order to get messages compiled, should I just subclass
>> build and develop commands?
> I don't understand your question.

I want messages to be compiled (using compile_catalog distutils command
from babel) in all these cases:
1) create a binary distribution
2) create an egg
3) running the setup using develop command

> [...]
> Personally, however, if I had to do what you're doing, I'd package a
> build_mo command as a setuptools plugin, and add it to my build_requires
> dependencies.  That way, I could use it with multiple projects.

This is indeed what I'm doing, using babel.

However I noted that running
  python setup.py develop

does not execute the compile_catalog command.

>  I'd
> still have to do the short 'build' subclass in the setup.py, but it's
> not a lot of code to add.

Thanks  Manlio

More information about the Distutils-SIG mailing list