scikit-build-core icon indicating copy to clipboard operation
scikit-build-core copied to clipboard

feat: Add a setting to disallow hard-coding some setting keys in the `pyproject.toml`

Open LecrisUT opened this issue 7 months ago • 1 comments

This complements the discussion in #1050 that we should not allow some fields to be hard-coded. We should allow them in the context of overrides, so here is a rather convoluted way of adding that check.

This will also make it possible to extend it further if we want more specific checks for specific overrides matchers as well. E.g. we can add a restriction that build.requires cannot have @ in an sdist

LecrisUT avatar May 14 '25 13:05 LecrisUT

Following discussion with @henryiii during Note from community meeting. Ideally, the schema should be updated before integrating.

jcfr avatar Oct 17 '25 16:10 jcfr

Note this is a very slight breaking change; if someone put fail = false explicitly at the top level, now that will be an error unless strictness is turned off. I think that's fine though, as it should be quite rare to do that, and easy to fix. We could put a workaround for this case for a while if really needed, though.

henryiii avatar Nov 19 '25 22:11 henryiii