chore: Add a platform_interface type to export from each platform

This avoids the repetition of the platform checks in __main__.py
by defining a dataclass with `get_python_configurations` and `build`.
This commit is contained in:
Hood Chatham
2023-04-10 13:30:23 -07:00
parent 33f642dc0b
commit 26dd3f399e
7 changed files with 54 additions and 34 deletions
+3 -2
View File
@@ -7,7 +7,7 @@ from pathlib import Path
import pytest
from cibuildwheel.__main__ import get_build_identifiers
from cibuildwheel.__main__ import get_build_identifiers, get_platform_interface
from cibuildwheel.bashlex_eval import local_environment_executor
from cibuildwheel.environment import parse_environment
from cibuildwheel.options import (
@@ -49,8 +49,9 @@ def test_options_1(tmp_path, monkeypatch):
options = Options(platform="linux", command_line_arguments=args, env={})
interface = get_platform_interface("linux")
identifiers = get_build_identifiers(
platform="linux",
interface=interface,
build_selector=options.globals.build_selector,
architectures=options.globals.architectures,
)