{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://json.schemastore.org/scikit-build.json",
  "description": "Scikit-build-core's settings.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "cmake": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "minimum-version": {
          "type": "string",
          "default": "3.15",
          "description": "The minimum version of CMake to use. If CMake is not present on the system or is older than this, it will be downloaded via PyPI if possible. An empty string will disable this check."
        },
        "args": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of args to pass to CMake when configuring the project. Setting this in config or envvar will override toml. See also ``cmake.define``."
        },
        "define": {
          "type": "object",
          "patternProperties": {
            ".+": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          },
          "description": "A table of defines to pass to CMake when configuring the project. Additive."
        },
        "verbose": {
          "type": "boolean",
          "default": false,
          "description": "Verbose printout when building."
        },
        "build-type": {
          "type": "string",
          "default": "Release",
          "description": "The build type to use when building the project. Valid options are: \"Debug\", \"Release\", \"RelWithDebInfo\", \"MinSizeRel\", \"\", etc."
        },
        "source-dir": {
          "type": "string",
          "default": ".",
          "description": "The source directory to use when building the project. Currently only affects the native builder (not the setuptools plugin)."
        },
        "targets": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The build targets to use when building the project. Empty builds the default target."
        }
      }
    },
    "ninja": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "minimum-version": {
          "type": "string",
          "default": "1.5",
          "description": "The minimum version of Ninja to use. If Ninja is not present on the system or is older than this, it will be downloaded via PyPI if possible. An empty string will disable this check."
        },
        "make-fallback": {
          "type": "boolean",
          "default": true,
          "description": "If CMake is not present on the system or is older required, it will be downloaded via PyPI if possible. An empty string will disable this check."
        }
      }
    },
    "logging": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "level": {
          "enum": ["NOTSET", "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"],
          "default": "WARNING",
          "description": "The logging level to display, \"DEBUG\", \"INFO\", \"WARNING\", and \"ERROR\" are possible options."
        }
      }
    },
    "sdist": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "include": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Files to include in the SDist even if they are skipped by default. Supports gitignore syntax."
        },
        "exclude": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Files to exclude from the SDist even if they are included by default. Supports gitignore syntax."
        },
        "reproducible": {
          "type": "boolean",
          "default": true,
          "description": "If set to True, try to build a reproducible distribution (Unix and Python 3.9+ recommended).  ``SOURCE_DATE_EPOCH`` will be used for timestamps, or a fixed value if not set."
        },
        "cmake": {
          "type": "boolean",
          "default": false,
          "description": "If set to True, CMake will be run before building the SDist."
        }
      }
    },
    "wheel": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "packages": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of packages to auto-copy into the wheel. If this is not set, it will default to the first of ``src/<package>``, ``python/<package>``, or ``<package>`` if they exist.  The prefix(s) will be stripped from the package name inside the wheel."
        },
        "py-api": {
          "type": "string",
          "default": "",
          "description": "The Python tags. The default (empty string) will use the default Python version. You can also set this to \"cp37\" to enable the CPython 3.7+ Stable ABI / Limited API (only on CPython and if the version is sufficient, otherwise this has no effect). Or you can set it to \"py3\" or \"py2.py3\" to ignore Python ABI compatibility. The ABI tag is inferred from this tag."
        },
        "expand-macos-universal-tags": {
          "type": "boolean",
          "default": false,
          "description": "Fill out extra tags that are not required. This adds \"x86_64\" and \"arm64\" to the list of platforms when \"universal2\" is used, which helps older Pip's (before 21.0.1) find the correct wheel."
        },
        "install-dir": {
          "type": "string",
          "default": "",
          "description": "The install directory for the wheel. This is relative to the platlib root. You might set this to the package name. The original dir is still at SKBUILD_PLATLIB_DIR (also SKBUILD_DATA_DIR, etc. are available). EXPERIMENTAL: An absolute path will be one level higher than the platlib root, giving access to \"/platlib\", \"/data\", \"/headers\", and \"/scripts\"."
        },
        "license-files": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "A list of license files to include in the wheel. Supports glob patterns."
        }
      }
    },
    "backport": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "find-python": {
          "type": "string",
          "default": "3.26.1",
          "description": "If CMake is less than this value, backport a copy of FindPython. Set to 0 disable this, or the empty string."
        }
      }
    },
    "editable": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "mode": {
          "enum": ["redirect"],
          "default": "redirect",
          "description": "Select the editable mode to use. Currently only \"redirect\" is supported."
        },
        "verbose": {
          "type": "boolean",
          "default": true,
          "description": "Turn on verbose output for the editable mode rebuilds."
        },
        "rebuild": {
          "type": "boolean",
          "default": false,
          "description": "Rebuild the project when the package is imported. The build-directory must be set."
        }
      }
    },
    "install": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "components": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The components to install. If empty, all default components are installed."
        },
        "strip": {
          "type": "boolean",
          "description": "Whether to strip the binaries. True for scikit-build-core 0.5+."
        }
      }
    },
    "generate": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": ["path", "template"],
            "properties": {
              "path": {
                "type": "string",
                "description": "The path (relative to platlib) for the file to generate.",
                "minLength": 1
              },
              "template": {
                "type": "string",
                "description": "The template to use for the file. This includes string.Template style placeholders for all the metadata. If empty, a template-path must be set.",
                "minLength": 1
              },
              "location": {
                "enum": ["install", "build", "source"],
                "default": "install",
                "description": "The place to put the generated file. The \"build\" directory is useful for CMake files, and the \"install\" directory is useful for Python files, usually. You can also write directly to the \"source\" directory, will overwrite existing files & remember to gitignore the file."
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": ["path", "template-path"],
            "properties": {
              "path": {
                "type": "string",
                "description": "The path (relative to platlib) for the file to generate.",
                "minLength": 1
              },
              "template-path": {
                "type": "string",
                "description": "The path to the template file. If empty, a template must be set.",
                "minLength": 1
              },
              "location": {
                "enum": ["install", "build", "source"],
                "default": "install",
                "description": "The place to put the generated file. The \"build\" directory is useful for CMake files, and the \"install\" directory is useful for Python files, usually. You can also write directly to the \"source\" directory, will overwrite existing files & remember to gitignore the file."
              }
            }
          }
        ]
      }
    },
    "metadata": {
      "type": "object",
      "description": "List dynamic metadata fields and hook locations in this table.",
      "additionalProperties": false,
      "properties": {
        "version": {
          "$ref": "#/$defs/metadata"
        },
        "description": {
          "$ref": "#/$defs/metadata"
        },
        "license": {
          "$ref": "#/$defs/metadata"
        },
        "readme": {
          "$ref": "#/$defs/metadata"
        },
        "requires-python": {
          "$ref": "#/$defs/metadata"
        },
        "dependencies": {
          "$ref": "#/$defs/metadata"
        },
        "optional-dependencies": {
          "$ref": "#/$defs/metadata"
        },
        "entrypoints": {
          "$ref": "#/$defs/metadata"
        },
        "authors": {
          "$ref": "#/$defs/metadata"
        },
        "maintainers": {
          "$ref": "#/$defs/metadata"
        },
        "urls": {
          "$ref": "#/$defs/metadata"
        },
        "classifiers": {
          "$ref": "#/$defs/metadata"
        },
        "keywords": {
          "$ref": "#/$defs/metadata"
        },
        "scripts": {
          "$ref": "#/$defs/metadata"
        },
        "gui-scripts": {
          "$ref": "#/$defs/metadata"
        }
      }
    },
    "strict-config": {
      "type": "boolean",
      "default": true,
      "description": "Strictly check all config options. If False, warnings will be printed for unknown options. If True, an error will be raised."
    },
    "experimental": {
      "type": "boolean",
      "default": false,
      "description": "Enable early previews of features not finalized yet."
    },
    "minimum-version": {
      "type": "string",
      "description": "If set, this will provide a method for backward compatibility."
    },
    "build-dir": {
      "type": "string",
      "default": "",
      "description": "The build directory. Defaults to a temporary directory, but can be set."
    },
    "overrides": {
      "type": "array",
      "items": {
        "type": "object",
        "required": ["if"],
        "minProperties": 2,
        "additionalProperties": false,
        "properties": {
          "if": {
            "type": "object",
            "minProperties": 1,
            "additionalProperties": false,
            "properties": {
              "python-version": {
                "type": "string"
              },
              "implementation-name": {
                "type": "string"
              },
              "implementation-version": {
                "type": "string"
              },
              "platform-system": {
                "type": "string"
              },
              "platform-machine": {
                "type": "string"
              },
              "platform-node": {
                "type": "string"
              }
            }
          },
          "cmake": {
            "$ref": "#/properties/cmake"
          },
          "ninja": {
            "$ref": "#/properties/ninja"
          },
          "logging": {
            "$ref": "#/properties/logging"
          },
          "sdist": {
            "$ref": "#/properties/sdist"
          },
          "wheel": {
            "$ref": "#/properties/wheel"
          },
          "backport": {
            "$ref": "#/properties/backport"
          },
          "editable": {
            "$ref": "#/properties/editable"
          },
          "install": {
            "$ref": "#/properties/install"
          },
          "generate": {
            "$ref": "#/properties/generate"
          },
          "metadata": {
            "$ref": "#/properties/metadata"
          },
          "strict-config": {
            "$ref": "#/properties/strict-config"
          },
          "experimental": {
            "$ref": "#/properties/experimental"
          },
          "minimum-version": {
            "$ref": "#/properties/minimum-version"
          },
          "build-dir": {
            "$ref": "#/properties/build-dir"
          }
        }
      }
    }
  },
  "$defs": {
    "metadata": {
      "type": "object",
      "properties": {
        "provider": {
          "type": "string"
        },
        "provider-path": {
          "type": "string"
        }
      }
    }
  }
}
