File tree 2 files changed +26
-0
lines changed
src/scikit_build_core/build
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:
343
343
wheel.expand-macos-universal-tags = true
344
344
```
345
345
346
+
347
+ You can also specify a build tag:
348
+
349
+ ``` {conftabs} wheel.build-tag 1
350
+
351
+ ```
352
+
346
353
You can select only specific components to install:
347
354
348
355
``` {conftabs} install.components ["python"]
@@ -355,6 +362,7 @@ And you can turn off binary stripping:
355
362
356
363
```
357
364
365
+
358
366
## Configuring CMake arguments and defines
359
367
360
368
You can select a different build type, such as ` Debug ` :
Original file line number Diff line number Diff line change 9
9
from pathlib import Path
10
10
from typing import TYPE_CHECKING
11
11
12
+ from packaging .requirements import Requirement
13
+ from packaging .utils import canonicalize_name
14
+
12
15
from .. import __version__
13
16
from .._compat import tomllib
14
17
from .._compat .typing import Literal , assert_never
@@ -139,12 +142,27 @@ def _build_wheel_impl(
139
142
140
143
settings_reader .validate_may_exit ()
141
144
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
+
142
159
metadata = get_standard_metadata (pyproject , settings )
143
160
144
161
if metadata .version is None :
145
162
msg = "project.version is not specified, must be statically present or tool.scikit-build metadata.version.provider configured when dynamic"
146
163
raise AssertionError (msg )
147
164
165
+ # Get the closest (normally) importable name
148
166
normalized_name = metadata .name .replace ("-" , "_" ).replace ("." , "_" )
149
167
150
168
if settings .wheel .cmake :
You can’t perform that action at this time.
0 commit comments