Skip to content

Commit 781ebc4

Browse files
joerickhenryiii
authored andcommitted
Add TOML examples
1 parent b74961f commit 781ebc4

File tree

3 files changed

+44
-1
lines changed

3 files changed

+44
-1
lines changed

bin/generate_schema.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,9 @@
221221
test-skip:
222222
description: Skip running tests on some builds.
223223
type: string_array
224+
test-environment:
225+
description: Set environment variables for the test environment
226+
type: string_table
224227
"""
225228

226229
schema = yaml.safe_load(starter)
@@ -300,6 +303,7 @@
300303
test-extras: {"$ref": "#/$defs/inherit"}
301304
test-sources: {"$ref": "#/$defs/inherit"}
302305
test-requires: {"$ref": "#/$defs/inherit"}
306+
test-environment: {"$ref": "#/$defs/inherit"}
303307
"""
304308
)
305309

cibuildwheel/resources/cibuildwheel.schema.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,24 @@
544544
],
545545
"title": "CIBW_TEST_SKIP"
546546
},
547+
"test-environment": {
548+
"description": "Set environment variables for the test environment",
549+
"oneOf": [
550+
{
551+
"type": "string"
552+
},
553+
{
554+
"type": "object",
555+
"additionalProperties": false,
556+
"patternProperties": {
557+
".+": {
558+
"type": "string"
559+
}
560+
}
561+
}
562+
],
563+
"title": "CIBW_TEST_ENVIRONMENT"
564+
},
547565
"overrides": {
548566
"type": "array",
549567
"description": "An overrides array",
@@ -610,6 +628,9 @@
610628
},
611629
"test-requires": {
612630
"$ref": "#/$defs/inherit"
631+
},
632+
"test-environment": {
633+
"$ref": "#/$defs/inherit"
613634
}
614635
}
615636
},
@@ -714,6 +735,9 @@
714735
},
715736
"test-requires": {
716737
"$ref": "#/properties/test-requires"
738+
},
739+
"test-environment": {
740+
"$ref": "#/properties/test-environment"
717741
}
718742
}
719743
}
@@ -836,6 +860,9 @@
836860
},
837861
"test-requires": {
838862
"$ref": "#/properties/test-requires"
863+
},
864+
"test-environment": {
865+
"$ref": "#/properties/test-environment"
839866
}
840867
}
841868
},
@@ -890,6 +917,9 @@
890917
},
891918
"test-requires": {
892919
"$ref": "#/properties/test-requires"
920+
},
921+
"test-environment": {
922+
"$ref": "#/properties/test-environment"
893923
}
894924
}
895925
},
@@ -957,6 +987,9 @@
957987
},
958988
"test-requires": {
959989
"$ref": "#/properties/test-requires"
990+
},
991+
"test-environment": {
992+
"$ref": "#/properties/test-environment"
960993
}
961994
}
962995
},
@@ -1011,6 +1044,9 @@
10111044
},
10121045
"test-requires": {
10131046
"$ref": "#/properties/test-requires"
1047+
},
1048+
"test-environment": {
1049+
"$ref": "#/properties/test-environment"
10141050
}
10151051
}
10161052
},
@@ -1065,6 +1101,9 @@
10651101
},
10661102
"test-requires": {
10671103
"$ref": "#/properties/test-requires"
1104+
},
1105+
"test-environment": {
1106+
"$ref": "#/properties/test-environment"
10681107
}
10691108
}
10701109
}

docs/options.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,7 +1541,7 @@ This option is not supported in the overrides section in `pyproject.toml`.
15411541

15421542
### `CIBW_TEST_ENVIRONMENT` {: #test-environment}
15431543

1544-
> Set environment variables for the test command
1544+
> Set environment variables for the test environment
15451545
15461546
A space-separated list of environment variables to set in the test environment.
15471547

0 commit comments

Comments
 (0)