File tree Expand file tree Collapse file tree 3 files changed +32
-0
lines changed
Expand file tree Collapse file tree 3 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -217,6 +217,18 @@ def build(options: BuildOptions) -> None:
217217 # clean up test environment
218218 docker .call (['rm' , '-rf' , venv_dir ])
219219
220+ existing_output_files = docker .call (['ls' ], cwd = container_output_dir ).split ('\n ' )
221+ for repaired_wheel in repaired_wheels :
222+ if repaired_wheel .name in existing_output_files :
223+ message = f'Created wheel ({ repaired_wheel } ) already exists in output directory.'
224+ if 'abi3' in repaired_wheel .name :
225+ message += ('\n '
226+ "It looks like you are building wheels against Python's limited API/stable ABI;\n "
227+ 'please limit your Python selection to a single version when building limited API\n '
228+ 'wheels, with CIBW_BUILD.' )
229+ log .error (message )
230+ sys .exit (1 )
231+
220232 # move repaired wheels to output
221233 docker .call (['mkdir' , '-p' , container_output_dir ])
222234 docker .call (['mv' , * repaired_wheels , container_output_dir ])
Original file line number Diff line number Diff line change @@ -293,6 +293,16 @@ def build(options: BuildOptions) -> None:
293293 # clean up
294294 shutil .rmtree (venv_dir )
295295
296+ if (options .output_dir / repaired_wheel .name ).exists ():
297+ message = f'Created wheel ({ repaired_wheel } ) already exists in output directory.'
298+ if 'abi3' in repaired_wheel .name :
299+ message += ('\n '
300+ "It looks like you are building wheels against Python's limited API/stable ABI;\n "
301+ 'please limit your Python selection to a single version when building limited API\n '
302+ 'wheels, with CIBW_BUILD.' )
303+ log .error (message )
304+ sys .exit (1 )
305+
296306 # we're all done here; move it to output (overwrite existing)
297307 shutil .move (str (repaired_wheel ), options .output_dir )
298308 log .build_end ()
Original file line number Diff line number Diff line change @@ -323,6 +323,16 @@ def build(options: BuildOptions) -> None:
323323 # clean up
324324 shutil .rmtree (venv_dir )
325325
326+ if (options .output_dir / repaired_wheel .name ).exists ():
327+ message = f'Created wheel ({ repaired_wheel } ) already exists in output directory.'
328+ if 'abi3' in repaired_wheel .name :
329+ message += ('\n '
330+ "It looks like you are building wheels against Python's limited API/stable ABI;\n "
331+ 'please limit your Python selection to a single version when building limited API\n '
332+ 'wheels, with CIBW_BUILD.' )
333+ log .error (message )
334+ sys .exit (1 )
335+
326336 # we're all done here; move it to output (remove if already exists)
327337 shutil .move (str (repaired_wheel ), options .output_dir )
328338 log .build_end ()
You can’t perform that action at this time.
0 commit comments