chore: move AlreadyBuiltWheelError & NonPlatformWheelError to errors.py (#1920)

This commit is contained in:
Matthieu Darbois
2024-07-07 09:47:03 +02:00
committed by GitHub
parent 7e5a838a63
commit a4d24056ef
8 changed files with 45 additions and 49 deletions
+2 -4
View File
@@ -25,11 +25,9 @@ from .options import Options
from .typing import PathOrStr
from .util import (
CIBW_CACHE_PATH,
AlreadyBuiltWheelError,
BuildFrontendConfig,
BuildFrontendName,
BuildSelector,
NonPlatformWheelError,
call,
combine_constraints,
detect_ci_provider,
@@ -525,7 +523,7 @@ def build(options: Options, tmp_path: Path) -> None:
repaired_wheel_dir.mkdir()
if built_wheel.name.endswith("none-any.whl"):
raise NonPlatformWheelError()
raise errors.NonPlatformWheelError()
if build_options.repair_command:
log.step("Repairing wheel...")
@@ -550,7 +548,7 @@ 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)
raise errors.AlreadyBuiltWheelError(repaired_wheel.name)
log.step_end()