Menu

Commit [r9763]  Maximize  Restore  History

setup: move all l10n related commands in `trac.util.dist`.

This way, plugins can easily re-use the Trac operating mode (compile before install). If they need to localize .js files, they should do something like:

{{{#!python
from trac.util.dist import get_l10n_js_cmdclass
extra['cmdclass'] = get_l10n_js_cmdclass()
}}}

If they don't need the new `*_js` related commands, they should do:

{{{#!python
from trac.util.dist import get_l10n_cmdclass
extra['cmdclass'] = get_l10n_cmdclass()
}}}

Also, don't modify the standard `build` command in place, but rather subclass it (http://www.mail-archive.com/distutils-sig@.../msg11760.html).

cboos 2010-05-24

changed /trunk/messages-js.cfg
changed /trunk/setup.cfg
changed /trunk/setup.py
added /trunk/trac/util/dist.py
/trunk/messages-js.cfg Diff Switch to side-by-side view
Loading...
/trunk/setup.cfg Diff Switch to side-by-side view
Loading...
/trunk/setup.py Diff Switch to side-by-side view
Loading...
/trunk/trac/util/dist.py Diff Switch to side-by-side view
Loading...