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:
@@ -10,6 +10,7 @@ from .logger import log
|
||||
from .options import Options
|
||||
from .typing import OrderedDict, PathOrStr, assert_never
|
||||
from .util import (
|
||||
AlreadyBuiltWheelError,
|
||||
BuildSelector,
|
||||
NonPlatformWheelError,
|
||||
find_compatible_wheel,
|
||||
@@ -255,6 +256,10 @@ def build_on_docker(
|
||||
|
||||
repaired_wheels = docker.glob(repaired_wheel_dir, "*.whl")
|
||||
|
||||
for repaired_wheel in repaired_wheels:
|
||||
if repaired_wheel.name in {wheel.name for wheel in built_wheels}:
|
||||
raise AlreadyBuiltWheelError(repaired_wheel.name)
|
||||
|
||||
if build_options.test_command and build_options.test_selector(config.identifier):
|
||||
log.step("Testing wheel...")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user