Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cibuildwheel/platforms/macos.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,10 @@ def setup_python(
# https://github.com/pypa/virtualenv/issues/620
# Also see https://github.com/python/cpython/pull/9516
env.pop("__PYVENV_LAUNCHER__", None)
# uv uses this over the current environment's python, so remove it to avoid confusion
env.pop("PYTHON_VERSION", None)
env.pop("PYTHON_ARCH", None)
env.pop("UV_PYTHON", None)

# we version pip ourselves, so we don't care about pip version checking
env["PIP_DISABLE_PIP_VERSION_CHECK"] = "1"
Expand Down
7 changes: 4 additions & 3 deletions cibuildwheel/platforms/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,13 +284,14 @@ def setup_python(
use_uv=use_uv,
)

# update env with results from CIBW_ENVIRONMENT
env = environment.as_dictionary(prev_environment=env)

# set up environment variables for run_with_env
env["PYTHON_VERSION"] = python_configuration.version
env["PYTHON_ARCH"] = python_configuration.arch
env["PIP_DISABLE_PIP_VERSION_CHECK"] = "1"

# update env with results from CIBW_ENVIRONMENT
env = environment.as_dictionary(prev_environment=env)
env.pop("UV_PYTHON", None)

# check what Python version we're on
where_python = call("where", "python", env=env, capture_stdout=True).splitlines()[0].strip()
Expand Down
Loading