[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)





Le 04/02/2022 à 22:07, Petter Reinholdtsen a écrit :
[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:

#!/usr/bin/python3

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

setup(
     name='command-not-found',
     version='0.3',
     packages=['CommandNotFound', 'CommandNotFound.db'],
     scripts=['command-not-found', 'cnf-update-db'],
     cmdclass={"build": build_extra.build_extra,
                 "build_i18n": build_i18n.build_i18n,
                 },
     data_files=[
         ('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?

Thanks Petter for the search, this looks promising. I will try that when time permits and will let you know.

Regards,
Yvan

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


Reply to: