Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ historic compatibility if you'd like:

```toml
[tool.scikit-build]
wheel.expand-macos-universal-tags = false
wheel.expand-macos-universal-tags = true
```

You can select only specific components to install:
Expand Down Expand Up @@ -541,6 +541,14 @@ speedups.

```

There are several values you can access through Python's formatting syntax:

- `cache_tag`: `sys.implementation.cache_tag`
- `wheel_tag`: The tags as computed for the wheel
- `build_type`: The current build type (`Release` by default)
- `state`: The current run state, `sdist`, `wheel`, `editable`,
`metadata_wheel`, and `metadata_editable`

Scikit-build-core also strictly validates configuration; if you need to disable
this, you can:

Expand Down
14 changes: 8 additions & 6 deletions src/scikit_build_core/build/wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,18 @@ def _build_wheel_impl(

normalized_name = metadata.name.replace("-", "_").replace(".", "_")

action = "editable" if editable else "wheel"
state = "editable" if editable else "wheel"
if wheel_directory is None:
action = f"metadata_{action}"
state = f"metadata_{state}"
if exit_after_config:
action = "sdist"
state = "sdist"

cmake = CMake.default_search(minimum_version=settings.cmake.minimum_version)

rich_print(
f"[green]***[/green] [bold][green]scikit-build-core {__version__}[/green]",
f"using [blue]CMake {cmake.version}[/blue]",
f"[red]({action})[/red]",
f"[red]({state})[/red]",
)

with tempfile.TemporaryDirectory() as tmpdir, fix_win_37_all_permissions(tmpdir):
Expand All @@ -130,6 +130,8 @@ def _build_wheel_impl(
settings.build_dir.format(
cache_tag=sys.implementation.cache_tag,
wheel_tag=str(tags),
build_type=settings.cmake.build_type,
state=state,
)
)
if settings.build_dir
Expand Down Expand Up @@ -228,7 +230,7 @@ def _build_wheel_impl(
cache_entries: dict[str, str | Path] = {
f"SKBUILD_{k.upper()}_DIR": v for k, v in wheel_dirs.items()
}
cache_entries["SKBUILD_STATE"] = action
cache_entries["SKBUILD_STATE"] = state
builder.configure(
defines=defines,
cache_entries=cache_entries,
Expand Down Expand Up @@ -256,7 +258,7 @@ def _build_wheel_impl(
rich_print("[green]***[/green] [bold]Installing project into wheel...")
builder.install(install_dir)

rich_print(f"[green]***[/green] [bold]Making {action}...")
rich_print(f"[green]***[/green] [bold]Making {state}...")
packages = _get_packages(
packages=settings.wheel.packages,
name=normalized_name,
Expand Down