Add asserts on macOS/Windows so that they can't be anything but default
...for now?
This commit is contained in:
@@ -4,13 +4,14 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import textwrap
|
||||
from os import PathLike
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, NamedTuple, Optional, Sequence, Union
|
||||
|
||||
from .environment import ParsedEnvironment
|
||||
from .logger import log
|
||||
from .util import (BuildOptions, BuildSelector, NonPlatformWheelError,
|
||||
from .util import (Architecture, BuildOptions, BuildSelector, NonPlatformWheelError,
|
||||
download, get_build_verbosity_extra_flags, get_pip_script,
|
||||
install_certifi_script, prepare_command)
|
||||
|
||||
@@ -182,6 +183,12 @@ def setup_python(python_configuration: PythonConfiguration,
|
||||
|
||||
|
||||
def build(options: BuildOptions) -> None:
|
||||
if options.architectures != [Architecture.x86_64]:
|
||||
raise ValueError(textwrap.dedent(f'''
|
||||
Invalid archs option {options.architectures}. macOS only supports x86_64 for the moment.
|
||||
If you want to set emulation architectures on Linux, use CIBW_ARCHS_LINUX instead.
|
||||
'''))
|
||||
|
||||
temp_dir = Path(tempfile.mkdtemp(prefix='cibuildwheel'))
|
||||
built_wheel_dir = temp_dir / 'built_wheel'
|
||||
repaired_wheel_dir = temp_dir / 'repaired_wheel'
|
||||
|
||||
@@ -3,6 +3,7 @@ import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
import textwrap
|
||||
from os import PathLike
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, NamedTuple, Optional, Sequence, Union
|
||||
@@ -12,7 +13,7 @@ import toml
|
||||
|
||||
from .environment import ParsedEnvironment
|
||||
from .logger import log
|
||||
from .util import (BuildOptions, BuildSelector, NonPlatformWheelError,
|
||||
from .util import (Architecture, BuildOptions, BuildSelector, NonPlatformWheelError,
|
||||
download, get_build_verbosity_extra_flags, get_pip_script,
|
||||
prepare_command)
|
||||
|
||||
@@ -201,6 +202,13 @@ def pep_518_cp35_workaround(package_dir: Path, env: Dict[str, str]) -> None:
|
||||
|
||||
|
||||
def build(options: BuildOptions) -> None:
|
||||
if options.architectures != [Architecture.amd64, Architecture.x86]:
|
||||
raise ValueError(textwrap.dedent(f'''
|
||||
Invalid archs option {options.architectures}. Windows only supports 'amd64,x86' for the
|
||||
moment. If you want to set emulation architectures on Linux, use CIBW_ARCHS_LINUX
|
||||
instead.
|
||||
'''))
|
||||
|
||||
temp_dir = Path(tempfile.mkdtemp(prefix='cibuildwheel'))
|
||||
built_wheel_dir = temp_dir / 'built_wheel'
|
||||
repaired_wheel_dir = temp_dir / 'repaired_wheel'
|
||||
|
||||
Reference in New Issue
Block a user