It looks like there's already a pyproject.toml no-binary option?
[tool.uv]
no-binary = true
Or for a specific package: [tool.uv]
no-binary-package = ["ruff"]
https://docs.astral.sh/uv/reference/settings/#no-binary