Merge pull request #1152 from mayeut/already-built

fix: error out if multiple wheels with the same name are produced
This commit is contained in:
Joe Rickerby
2022-07-05 16:58:52 +01:00
committed by GitHub
5 changed files with 69 additions and 0 deletions
+5
View File
@@ -11,6 +11,7 @@ from .oci_container import OCIContainer
from .options import Options
from .typing import OrderedDict, PathOrStr, assert_never
from .util import (
AlreadyBuiltWheelError,
BuildSelector,
NonPlatformWheelError,
find_compatible_wheel,
@@ -261,6 +262,10 @@ def build_in_container(
repaired_wheels = container.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...")