@@ -35,7 +35,7 @@ def test_simple_settings(tmp_path, platform, fname):
35
35
config_file_path : Path = tmp_path / fname
36
36
config_file_path .write_text (PYPROJECT_1 )
37
37
38
- options_reader = OptionsReader (config_file_path , platform = platform , environ = {})
38
+ options_reader = OptionsReader (config_file_path , platform = platform , env = {})
39
39
40
40
assert options_reader .get ("build" , env_plat = False , sep = " " ) == "cp39*"
41
41
@@ -78,7 +78,7 @@ def test_envvar_override(tmp_path, platform, monkeypatch):
78
78
options_reader = OptionsReader (
79
79
config_file_path ,
80
80
platform = platform ,
81
- environ = {
81
+ env = {
82
82
"CIBW_BUILD" : "cp38*" ,
83
83
"CIBW_MANYLINUX_X86_64_IMAGE" : "manylinux_2_24" ,
84
84
"CIBW_TEST_COMMAND" : "mytest" ,
@@ -108,13 +108,13 @@ def test_project_global_override_default_platform(tmp_path, platform):
108
108
repair-wheel-command = "repair-project-global"
109
109
"""
110
110
)
111
- options_reader = OptionsReader (pyproject_toml , platform = platform , environ = {})
111
+ options_reader = OptionsReader (pyproject_toml , platform = platform , env = {})
112
112
assert options_reader .get ("repair-wheel-command" ) == "repair-project-global"
113
113
114
114
115
115
def test_env_global_override_default_platform (tmp_path , platform , monkeypatch ):
116
116
options_reader = OptionsReader (
117
- platform = platform , environ = {"CIBW_REPAIR_WHEEL_COMMAND" : "repair-env-global" }
117
+ platform = platform , env = {"CIBW_REPAIR_WHEEL_COMMAND" : "repair-env-global" }
118
118
)
119
119
assert options_reader .get ("repair-wheel-command" ) == "repair-env-global"
120
120
@@ -134,7 +134,7 @@ def test_env_global_override_project_platform(tmp_path, platform, monkeypatch):
134
134
options_reader = OptionsReader (
135
135
pyproject_toml ,
136
136
platform = platform ,
137
- environ = {
137
+ env = {
138
138
"CIBW_REPAIR_WHEEL_COMMAND" : "repair-env-global" ,
139
139
},
140
140
)
@@ -155,7 +155,7 @@ def test_global_platform_order(tmp_path, platform):
155
155
repair-wheel-command = "repair-project-global"
156
156
"""
157
157
)
158
- options_reader = OptionsReader (pyproject_toml , platform = platform , environ = {})
158
+ options_reader = OptionsReader (pyproject_toml , platform = platform , env = {})
159
159
assert options_reader .get ("repair-wheel-command" ) == f"repair-project-{ platform } "
160
160
161
161
@@ -171,7 +171,7 @@ def test_unexpected_key(tmp_path):
171
171
)
172
172
173
173
with pytest .raises (ConfigOptionError ) as excinfo :
174
- OptionsReader (pyproject_toml , platform = "linux" , environ = {})
174
+ OptionsReader (pyproject_toml , platform = "linux" , env = {})
175
175
176
176
assert "repair-wheel-command" in str (excinfo .value )
177
177
@@ -188,7 +188,7 @@ def test_underscores_in_key(tmp_path):
188
188
)
189
189
190
190
with pytest .raises (ConfigOptionError ) as excinfo :
191
- OptionsReader (pyproject_toml , platform = "linux" , environ = {})
191
+ OptionsReader (pyproject_toml , platform = "linux" , env = {})
192
192
193
193
assert "repair-wheel-command" in str (excinfo .value )
194
194
@@ -202,7 +202,7 @@ def test_unexpected_table(tmp_path):
202
202
"""
203
203
)
204
204
with pytest .raises (ConfigOptionError ):
205
- OptionsReader (pyproject_toml , platform = "linux" , environ = {})
205
+ OptionsReader (pyproject_toml , platform = "linux" , env = {})
206
206
207
207
208
208
def test_unsupported_join (tmp_path ):
@@ -213,7 +213,7 @@ def test_unsupported_join(tmp_path):
213
213
build = ["1", "2"]
214
214
"""
215
215
)
216
- options_reader = OptionsReader (pyproject_toml , platform = "linux" , environ = {})
216
+ options_reader = OptionsReader (pyproject_toml , platform = "linux" , env = {})
217
217
218
218
assert "1, 2" == options_reader .get ("build" , sep = ", " )
219
219
with pytest .raises (ConfigOptionError ):
@@ -229,9 +229,9 @@ def test_disallowed_a(tmp_path):
229
229
"""
230
230
)
231
231
disallow = {"windows" : {"manylinux-x86_64-image" }}
232
- OptionsReader (pyproject_toml , platform = "linux" , disallow = disallow , environ = {})
232
+ OptionsReader (pyproject_toml , platform = "linux" , disallow = disallow , env = {})
233
233
with pytest .raises (ConfigOptionError ):
234
- OptionsReader (pyproject_toml , platform = "windows" , disallow = disallow , environ = {})
234
+ OptionsReader (pyproject_toml , platform = "windows" , disallow = disallow , env = {})
235
235
236
236
237
237
def test_environment_override_empty (tmp_path , monkeypatch ):
@@ -247,7 +247,7 @@ def test_environment_override_empty(tmp_path, monkeypatch):
247
247
options_reader = OptionsReader (
248
248
pyproject_toml ,
249
249
platform = "linux" ,
250
- environ = {
250
+ env = {
251
251
"CIBW_MANYLINUX_I686_IMAGE" : "" ,
252
252
"CIBW_MANYLINUX_AARCH64_IMAGE" : "manylinux1" ,
253
253
},
@@ -320,7 +320,7 @@ def test_pyproject_2(tmp_path, platform):
320
320
pyproject_toml : Path = tmp_path / "pyproject.toml"
321
321
pyproject_toml .write_text (PYPROJECT_2 )
322
322
323
- options_reader = OptionsReader (config_file_path = pyproject_toml , platform = platform , environ = {})
323
+ options_reader = OptionsReader (config_file_path = pyproject_toml , platform = platform , env = {})
324
324
assert options_reader .get ("test-command" ) == "pyproject"
325
325
326
326
with options_reader .identifier ("random" ):
@@ -344,7 +344,7 @@ def test_overrides_not_a_list(tmp_path, platform):
344
344
)
345
345
346
346
with pytest .raises (ConfigOptionError ):
347
- OptionsReader (config_file_path = pyproject_toml , platform = platform , environ = {})
347
+ OptionsReader (config_file_path = pyproject_toml , platform = platform , env = {})
348
348
349
349
350
350
def test_config_settings (tmp_path ):
@@ -357,7 +357,7 @@ def test_config_settings(tmp_path):
357
357
"""
358
358
)
359
359
360
- options_reader = OptionsReader (config_file_path = pyproject_toml , platform = "linux" , environ = {})
360
+ options_reader = OptionsReader (config_file_path = pyproject_toml , platform = "linux" , env = {})
361
361
assert (
362
362
options_reader .get ("config-settings" , table = {"item" : '{k}="{v}"' , "sep" : " " })
363
363
== 'example="one" other="two" other="three"'
@@ -373,7 +373,7 @@ def test_pip_config_settings(tmp_path):
373
373
"""
374
374
)
375
375
376
- options_reader = OptionsReader (config_file_path = pyproject_toml , platform = "linux" , environ = {})
376
+ options_reader = OptionsReader (config_file_path = pyproject_toml , platform = "linux" , env = {})
377
377
assert (
378
378
options_reader .get (
379
379
"config-settings" , table = {"item" : "--config-settings='{k}=\" {v}\" '" , "sep" : " " }
0 commit comments