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 3535}.get (detect_ci_provider (), True )
3636
3737
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+
3856def get_platform () -> str :
3957 """Return the current platform as determined by CIBW_PLATFORM or sys.platform."""
4058 platform = os .environ .get ("CIBW_PLATFORM" , "" )
@@ -137,7 +155,7 @@ def cibuildwheel_run(
137155 env ["CIBW_BUILD" ] = "cp{}{}-*" .format (* SINGLE_PYTHON_VERSION )
138156
139157 with TemporaryDirectory () as tmp_output_dir :
140- subprocess . run (
158+ _subprocess_run (
141159 [
142160 sys .executable ,
143161 "-m" ,
@@ -149,7 +167,6 @@ def cibuildwheel_run(
149167 ],
150168 env = env ,
151169 cwd = project_path ,
152- check = True ,
153170 )
154171 wheels = sorted (p .name for p in (output_dir or Path (tmp_output_dir )).iterdir ())
155172 return wheels
You can’t perform that action at this time.
0 commit comments