File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
src/scikit_build_core/build Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,13 @@ historic compatibility if you'd like:
343343wheel.expand-macos-universal-tags = true
344344```
345345
346+
347+ You can also specify a build tag:
348+
349+ ``` {conftabs} wheel.build-tag 1
350+
351+ ```
352+
346353You can select only specific components to install:
347354
348355``` {conftabs} install.components ["python"]
@@ -355,6 +362,7 @@ And you can turn off binary stripping:
355362
356363```
357364
365+
358366## Configuring CMake arguments and defines
359367
360368You can select a different build type, such as ` Debug ` :
Original file line number Diff line number Diff line change 99from pathlib import Path
1010from typing import TYPE_CHECKING
1111
12+ from packaging .requirements import Requirement
13+ from packaging .utils import canonicalize_name
14+
1215from .. import __version__
1316from .._compat import tomllib
1417from .._compat .typing import Literal , assert_never
@@ -139,12 +142,27 @@ def _build_wheel_impl(
139142
140143 settings_reader .validate_may_exit ()
141144
145+ # Warn if cmake or ninja is in build-system.requires
146+ requirements = [
147+ canonicalize_name (Requirement (p ).name )
148+ for p in pyproject .get ("build-system" , {}).get ("requires" , [])
149+ ]
150+ if "cmake" in requirements :
151+ logger .warning (
152+ "cmake should not be in build-system.requires - scikit-build-core will inject it as needed"
153+ )
154+ if "ninja" in requirements :
155+ logger .warning (
156+ "ninja should not be in build-system.requires - scikit-build-core will inject it as needed"
157+ )
158+
142159 metadata = get_standard_metadata (pyproject , settings )
143160
144161 if metadata .version is None :
145162 msg = "project.version is not specified, must be statically present or tool.scikit-build metadata.version.provider configured when dynamic"
146163 raise AssertionError (msg )
147164
165+ # Get the closest (normally) importable name
148166 normalized_name = metadata .name .replace ("-" , "_" ).replace ("." , "_" )
149167
150168 if settings .wheel .cmake :
You can’t perform that action at this time.
0 commit comments