fix: error out if multiple wheels with the same name are produced
We shouldn't silently overwrite wheels that are produced in the same run that have the same filename, as this implies a misconfiguration.
This commit is contained in:
@@ -17,6 +17,7 @@ from .options import Options
|
||||
from .typing import PathOrStr, assert_never
|
||||
from .util import (
|
||||
CIBW_CACHE_PATH,
|
||||
AlreadyBuiltWheelError,
|
||||
BuildFrontend,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
@@ -365,6 +366,9 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
|
||||
repaired_wheel = next(repaired_wheel_dir.glob("*.whl"))
|
||||
|
||||
if repaired_wheel.name in {wheel.name for wheel in built_wheels}:
|
||||
raise AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
|
||||
if build_options.test_command and options.globals.test_selector(config.identifier):
|
||||
log.step("Testing wheel...")
|
||||
# set up a virtual environment to install and test from, to make sure
|
||||
|
||||
Reference in New Issue
Block a user