SafeEyes
SafeEyes copied to clipboard
migrate from setup.py to pyproject.toml
Description
This PR switches configuration from setup.py to pyproject.toml.
This is somewhat of a prerequisite in the plan discussed in https://github.com/slgobinath/SafeEyes/discussions/589.
Most of the tools there (type checkers, nox
/tox
, ruff
) expect to be configured with a pyproject.toml
file.
This documentation also "strongly recommends" using a pyproject.toml
file in some form.
In theory, it would be enough to just use the [build-backend]
table, and keep the setup.py
mostly as-is.
However, when a pyproject.toml
file is detected, it also enables build isolation automatically.
Build isolation means that the way .mo
files were generated needs to be changed (it is now a custom build step), and the data_files
key is deprecated, so I decided to properly migrate everything to pyproject.toml
.
The only thing this should have an impact on is building the release. I have tested locally, and using python -m build
properly builds the .whl
and .tar.gz
as before, with identical contents apart from some metadata differences.