docs: print a couple slighly more detailed error messages (#2044)
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
@@ -35,11 +35,14 @@ class NonPlatformWheelError(FatalError):
|
|||||||
"""
|
"""
|
||||||
Build failed because a pure Python wheel was generated.
|
Build failed because a pure Python wheel was generated.
|
||||||
|
|
||||||
If you intend to build a pure-Python wheel, you don't need cibuildwheel - use
|
If you intend to build a pure-Python wheel, you don't need
|
||||||
`pip wheel -w DEST_DIR .` instead.
|
cibuildwheel - use `pip wheel .`, `pipx run build --wheel`, `uv
|
||||||
|
build --wheel`, etc. instead. You only need cibuildwheel if you
|
||||||
|
have compiled (not Python) code in your wheels making them depend
|
||||||
|
on the platform.
|
||||||
|
|
||||||
If you expected a platform wheel, check your project configuration, or run
|
If you expected a platform wheel, check your project configuration,
|
||||||
cibuildwheel with CIBW_BUILD_VERBOSITY=1 to view build logs.
|
or run cibuildwheel with CIBW_BUILD_VERBOSITY=1 to view build logs.
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
super().__init__(message)
|
super().__init__(message)
|
||||||
|
|||||||
+10
-5
@@ -1,6 +1,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import functools
|
import functools
|
||||||
|
import inspect
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
@@ -149,11 +150,15 @@ def install_cpython(tmp: Path, version: str, url: str, free_threading: bool) ->
|
|||||||
if detect_ci_provider() is None:
|
if detect_ci_provider() is None:
|
||||||
# if running locally, we don't want to install CPython with sudo
|
# if running locally, we don't want to install CPython with sudo
|
||||||
# let the user know & provide a link to the installer
|
# let the user know & provide a link to the installer
|
||||||
msg = (
|
msg = inspect.cleandoc(
|
||||||
f"Error: CPython {version} is not installed.\n"
|
f"""
|
||||||
"cibuildwheel will not perform system-wide installs when running outside of CI.\n"
|
Error: CPython {version} is not installed.
|
||||||
f"To build locally, install CPython {version} on this machine, or, disable this version of Python using CIBW_SKIP=cp{version.replace('.', '')}-macosx_*\n"
|
cibuildwheel will not perform system-wide installs when running outside of CI.
|
||||||
f"\nDownload link: {url}"
|
To build locally, install CPython {version} on this machine, or, disable this
|
||||||
|
version of Python using CIBW_SKIP=cp{version.replace('.', '')}-macosx_*
|
||||||
|
For portable builds, cibuildwheel needs the official builds from python.org.
|
||||||
|
Download link: {url}
|
||||||
|
"""
|
||||||
)
|
)
|
||||||
raise errors.FatalError(msg)
|
raise errors.FatalError(msg)
|
||||||
pkg_path = tmp / "Python.pkg"
|
pkg_path = tmp / "Python.pkg"
|
||||||
|
|||||||
Reference in New Issue
Block a user