[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: WhosWho: a free software to create whos's who / yearbook / facebook in PDF format (again)

[Yvan Masson]
> Finally, I suppose it is better to handle all the `msgfmt` commands in 
> the `setup.py` script I use to produce the .whl file, but I don't know 
> if there is a standard way to do so.

I did a search in the Debian archive for a python package with
translations using gettext, to see how setup.py handle it there, and
came across the command-not-found package, whos setup.py look like this:


from distutils.core import setup
from DistUtilsExtra.command import (build_extra, build_i18n)
import glob

    packages=['CommandNotFound', 'CommandNotFound.db'],
    scripts=['command-not-found', 'cnf-update-db'],
    cmdclass={"build": build_extra.build_extra,
                "build_i18n": build_i18n.build_i18n,
        ('share/command-not-found/', glob.glob("data/*.db")),
        ('../etc', ['bash_command_not_found', 'zsh_command_not_found']),
        ('../etc/apt/apt.conf.d', ['data/50command-not-found']),

Perhaps your program can use the build_i18n rules too?
Happy hacking
Petter Reinholdtsen

Reply to: