Compiling gettext i18n messages during project bundling.
"Binary files should never be committed to a repository to promote transparency and security." That is why this project was created.
Simple, just add flit-gettext
to your pyproject.toml
build-system requirements and set the build-backend
:
# pyproject.toml
[build-system]
requires = [
"flit-gettext[scm]", # [scm] is optional
# …others, like wheel, etc.
]
# using flit-core as a base build-backend
build-backend = "flit_gettext.core"
# or using flit-scm as a base build-backend for git-based versioning
build-backend = "flit_gettext.scm"
# To use use flit-scm, you will need to include the optional dependency above.
Please make sure, your build system has gettext
installed.
If you ship wheels, those will include the compiled .mo
files.
That's it!