build: eliminate "python setup.py ..."
Stop supporting "python setup.py {build,build_pot,build_mo,install}".
Handle "make i18n" using the Makefile directly to simplify our
dependencies.
Stop requiring files that are generated at build-time. Git Cola
no longer depends on generated files.
Eliminate our dependency on the .mo files and the distutils.commands
entry points, which are problem due to the deprecation of distutils.
We were doing underhanded things like hooking into the sub_commands
in the core setuptools.command.build.build class, which was fragile
and did not fully support PEP-517/518 compatible build tools.
Furthermore, we were dependent on data_files to install our
generated .mo translation files, and there is no current supported
method to force "python -m build" or "pip install" to run the .mo
generation step during the build.
The Python Packaging Authority (PyPA) strongly recommends that *all*
data required by the package should be shipped as "package_data".
Now that we are using polib we can simply install our .po files
directly into the cola package data and read them directly.
There is no need to ship binary .mo files or deal with the
complexity around them.
Related Links:
* https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html
* https://pypa-build.readthedocs.io/en/stable/installation.html
* https://setuptools.pypa.io/en/latest/userguide/datafiles.html
Closes #1201
Signed-off-by: David Aguilar <davvid@gmail.com>
13 files changed: