* feat: add schema and validate-pyproject support Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * fix: address review comments, fix bug, add tests Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * fix: add test of examples in docs and fix Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> * fix: nicer titles Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com> --------- Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
16 lines
491 B
Python
16 lines
491 B
Python
from __future__ import annotations
|
|
|
|
import json
|
|
from pathlib import Path
|
|
from typing import Any
|
|
|
|
DIR = Path(__file__).parent.resolve()
|
|
|
|
|
|
def get_schema(tool_name: str = "cibuildwheel") -> dict[str, Any]:
|
|
"Get the stored complete schema for cibuildwheel settings."
|
|
assert tool_name == "cibuildwheel", "Only cibuildwheel is supported."
|
|
|
|
with DIR.joinpath("resources/cibuildwheel.schema.json").open(encoding="utf-8") as f:
|
|
return json.load(f) # type: ignore[no-any-return]
|