The build backend remains setuptools (for now).
Additionally, setuptools_scm is adopted, in place of our previous ad-hoc
handling of extracting version information from git. This plugin also
provides some interesting extra features, like automatic inclusion of
all versioned data files; now MANIFEST.in only needs to specify the very
few files to exclude from the source distribution.
On the other hand, the DIST_NAME and DIST_PACKAGE environment variables
are currently not being used. Their main purpose is somewhat fulfilled
with platform.platform(); and by not using them the new build setup can
be completely declarative, requiring users to run no custom code or ours
when building or installing liquidctl.
As the build backend is setuptools, setup.cfg is used for metadata and
other backend configuration, per the current setuptools docs.[^1] This
also means that we have yet not moved to PEP 621 ("Storing project
metadata in pyproject.toml").[^2]
To build the sdist and universal wheel, use python-build.[^3] Locally,
pip is still a suitable way to install, and --editable mode is still
supported. But when re-packing for Linux or other distributions,
consider python-installer.[^4][^5][^6]
[^1]: https://setuptools.pypa.io/en/latest/build_meta.html
[^2]: https://www.python.org/dev/peps/pep-0621/
[^3]: https://github.com/pypa/build
[^4]: https://github.com/pradyunsg/installer
[^5]: https://lists.archlinux.org/pipermail/arch-dev-public/2022-February/030737.html
[^6]: https://wiki.archlinux.org/title/Python_package_guidelines#Standards_based_(PEP_517)