File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 35
35
}.get (detect_ci_provider (), True )
36
36
37
37
38
+ def _subprocess_run (command : list [str ], ** kwargs : Any ) -> None :
39
+ result = subprocess .run (
40
+ command ,
41
+ capture_output = True ,
42
+ check = False ,
43
+ text = True ,
44
+ ** kwargs ,
45
+ )
46
+ if result .returncode != 0 :
47
+ msg = (
48
+ f"Subprocess failed with exit code { result .returncode } \n "
49
+ f"Command: { ' ' .join (command )} \n "
50
+ f"--- stdout ---\n { result .stdout } \n "
51
+ f"--- stderr ---\n { result .stderr } "
52
+ )
53
+ raise AssertionError (msg )
54
+
55
+
38
56
def get_platform () -> str :
39
57
"""Return the current platform as determined by CIBW_PLATFORM or sys.platform."""
40
58
platform = os .environ .get ("CIBW_PLATFORM" , "" )
@@ -137,7 +155,7 @@ def cibuildwheel_run(
137
155
env ["CIBW_BUILD" ] = "cp{}{}-*" .format (* SINGLE_PYTHON_VERSION )
138
156
139
157
with TemporaryDirectory () as tmp_output_dir :
140
- subprocess . run (
158
+ _subprocess_run (
141
159
[
142
160
sys .executable ,
143
161
"-m" ,
@@ -149,7 +167,6 @@ def cibuildwheel_run(
149
167
],
150
168
env = env ,
151
169
cwd = project_path ,
152
- check = True ,
153
170
)
154
171
wheels = sorted (p .name for p in (output_dir or Path (tmp_output_dir )).iterdir ())
155
172
return wheels
You can’t perform that action at this time.
0 commit comments