File tree 3 files changed +36
-2
lines changed
3 files changed +36
-2
lines changed Original file line number Diff line number Diff line change 243
243
non_global_options = {k : {"$ref" : f"#/properties/{ k } " } for k in schema ["properties" ]}
244
244
del non_global_options ["build" ]
245
245
del non_global_options ["skip" ]
246
- del non_global_options ["container-engine" ]
247
246
del non_global_options ["test-skip" ]
248
247
249
248
overrides ["items" ]["properties" ]["select" ]["oneOf" ] = string_array
254
253
not_linux = non_global_options .copy ()
255
254
256
255
del not_linux ["environment-pass" ]
256
+ del not_linux ["container-engine" ]
257
257
for key in list (not_linux ):
258
258
if "linux-" in key :
259
259
del not_linux [key ]
Original file line number Diff line number Diff line change 491
491
"config-settings" : {
492
492
"$ref" : " #/properties/config-settings"
493
493
},
494
+ "container-engine" : {
495
+ "$ref" : " #/properties/container-engine"
496
+ },
494
497
"dependency-versions" : {
495
498
"$ref" : " #/properties/dependency-versions"
496
499
},
579
582
"config-settings" : {
580
583
"$ref" : " #/properties/config-settings"
581
584
},
585
+ "container-engine" : {
586
+ "$ref" : " #/properties/container-engine"
587
+ },
582
588
"environment" : {
583
589
"$ref" : " #/properties/environment"
584
590
},
Original file line number Diff line number Diff line change @@ -20,11 +20,39 @@ def test_validate_default_schema():
20
20
assert validator (example ) is not None
21
21
22
22
23
- def test_validate_bad_container_engine ():
23
+ def test_validate_container_engine ():
24
+ """
25
+ This test checks container engine can be overridden - it used to be a
26
+ global option but is now a build option.
27
+ """
28
+
24
29
example = tomllib .loads (
25
30
"""
31
+ [tool.cibuildwheel]
32
+ container-engine = "docker"
33
+
26
34
[tool.cibuildwheel.linux]
27
35
container-engine = "docker"
36
+
37
+ [[tool.cibuildwheel.overrides]]
38
+ select = "*_x86_64"
39
+ container-engine = "docker; create_args: --platform linux/arm64/v8"
40
+ """
41
+ )
42
+
43
+ validator = validate_pyproject .api .Validator ()
44
+ assert validator (example ) is not None
45
+
46
+
47
+ @pytest .mark .parametrize ("platform" , ["macos" , "windows" ])
48
+ def test_validate_bad_container_engine (platform : str ):
49
+ """
50
+ container-engine is not a valid option for macos or windows
51
+ """
52
+ example = tomllib .loads (
53
+ f"""
54
+ [tool.cibuildwheel.{ platform } ]
55
+ container-engine = "docker"
28
56
"""
29
57
)
30
58
You can’t perform that action at this time.
0 commit comments