Use python -V -V for Windows build diagnostics (#2832)

This commit is contained in:
TT
2026-05-03 20:10:49 +05:30
committed by GitHub
parent a9f58eb656
commit 29d36dc17d
6 changed files with 9 additions and 5 deletions
+4 -1
View File
@@ -229,7 +229,10 @@ def setup_env(
f"or insert {command} above it." f"or insert {command} above it."
) )
raise errors.FatalError(msg) raise errors.FatalError(msg)
call(command, "--version", env=build_env) if command == "python":
call(command, "-V", "-V", env=build_env)
else:
call(command, "--version", env=build_env)
# Construct an altered environment which simulates running on Android. # Construct an altered environment which simulates running on Android.
android_env = setup_android_env(config, python_dir, venv_dir, build_env) android_env = setup_android_env(config, python_dir, venv_dir, build_env)
+1 -1
View File
@@ -355,7 +355,7 @@ def setup_python(
"entry or insert python above it." "entry or insert python above it."
) )
raise errors.FatalError(msg) raise errors.FatalError(msg)
call("python", "--version", env=env) call("python", "-V", "-V", env=env)
# Check what pip version we're on # Check what pip version we're on
assert (venv_bin_path / "pip").exists() assert (venv_bin_path / "pip").exists()
+1
View File
@@ -237,6 +237,7 @@ def build_in_container(
if PurePosixPath(which_python) != python_bin / "python": if PurePosixPath(which_python) != python_bin / "python":
msg = "python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it." msg = "python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it."
raise errors.FatalError(msg) raise errors.FatalError(msg)
container.call(["python", "-V", "-V"], env=env)
if use_uv: if use_uv:
which_uv = container.call(["which", "uv"], env=env, capture_output=True).strip() which_uv = container.call(["which", "uv"], env=env, capture_output=True).strip()
+1 -1
View File
@@ -270,7 +270,7 @@ def setup_python(
if which_python != str(venv_bin_path / "python"): if which_python != str(venv_bin_path / "python"):
msg = "python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it." msg = "python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it."
raise errors.FatalError(msg) raise errors.FatalError(msg)
call("python", "--version", env=env) call("python", "-V", "-V", env=env)
# check what pip version we're on # check what pip version we're on
if not use_uv: if not use_uv:
+1 -1
View File
@@ -271,7 +271,7 @@ def setup_python(
if which_python != str(venv_bin_path / "python"): if which_python != str(venv_bin_path / "python"):
msg = "python available on PATH doesn't match our venv instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it." msg = "python available on PATH doesn't match our venv instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it."
raise errors.FatalError(msg) raise errors.FatalError(msg)
call("python", "--version", env=env) call("python", "-V", "-V", env=env)
# check what pip version we're on # check what pip version we're on
assert (venv_bin_path / "pip").exists() assert (venv_bin_path / "pip").exists()
+1 -1
View File
@@ -306,7 +306,7 @@ def setup_python(
if where_python != str(venv_path / "Scripts" / "python.exe"): if where_python != str(venv_path / "Scripts" / "python.exe"):
msg = "python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it." msg = "python available on PATH doesn't match our installed instance. If you have modified PATH, ensure that you don't overwrite cibuildwheel's entry or insert python above it."
raise errors.FatalError(msg) raise errors.FatalError(msg)
call("python", "--version", env=env) call("python", "-V", "-V", env=env)
call("python", "-c", "\"import struct; print(struct.calcsize('P') * 8)\"", env=env) call("python", "-c", "\"import struct; print(struct.calcsize('P') * 8)\"", env=env)
# check what pip version we're on # check what pip version we're on