Re: WhosWho: a free software to create whos's who / yearbook / facebook in PDF format (again)
- To: debian-edu@lists.debian.org
- Subject: Re: WhosWho: a free software to create whos's who / yearbook / facebook in PDF format (again)
- From: Petter Reinholdtsen <pere@hungry.com>
- Date: Fri, 04 Feb 2022 22:07:24 +0100
- Message-id: <[🔎] sa6sfsybasz.fsf@hjemme.reinholdtsen.name>
- In-reply-to: <0c29da27-7a22-d8b6-d924-60cebf47db49@masson-informatique.fr>
- References: <8601ca69-b64d-4b41-e952-9fbcfa268502@masson-informatique.fr> <sa6leyv4xzq.fsf@hjemme.reinholdtsen.name> <0c29da27-7a22-d8b6-d924-60cebf47db49@masson-informatique.fr>
[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?
--
Happy hacking
Petter Reinholdtsen
Reply to: