Formattable fieldsΒΆ
The following configure keys are formatted as Python str.format templates:
build-dirbuild.requireseditable.rebuild-dir
Added in version 1.0: editable.rebuild-dir is formattable.
For example, to get a persistent build directory per wheel tag:
[tool.scikit-build]
build-dir = "build/{wheel_tag}"
The available variables are the members of
scikit_build_core.format.PyprojectFormatter:
- PyprojectFormatter.build_type: str
Build type passed as
cmake.build_type.
- PyprojectFormatter.cache_tag: str
Tag used by the import machinery in the filenames of cached modules, i.e.
sys.implementation.cache_tag.
- PyprojectFormatter.name: str
The normalized project name (canonicalized per PEP 503, then
-replaced by_), matching the wheel/sdist filename. Handy to disambiguate a sharedbuild-diracross a workspace, e.g.build-dir = "build/{name}/{wheel_tag}". Not available while resolvingbuild.requires, since metadata is not read yet at that point.
- PyprojectFormatter.root: RootPathResolver
Root path of the current project.
- PyprojectFormatter.state: Literal['sdist', 'wheel', 'editable', 'metadata_wheel', 'metadata_editable']
The state of the build.
- PyprojectFormatter.wheel_tag: str
The tags as computed for the wheel.