Skip to content

Commit 7c0a95a

Browse files
committed
Use python-build-standalone
1 parent b191c0a commit 7c0a95a

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

cibuildwheel/platforms/android.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from ..util.file import CIBW_CACHE_PATH, copy_test_sources, download, move_file
2626
from ..util.helpers import prepare_command
2727
from ..util.packaging import find_compatible_wheel
28+
from ..util.python_build_standalone import create_python_build_standalone_environment
2829
from ..venv import constraint_flags, virtualenv
2930

3031

@@ -165,23 +166,16 @@ def setup_env(
165166
"""
166167
log.step("Setting up build environment...")
167168

168-
python_exe_name = f"python{config.version}"
169-
python_exe = shutil.which(python_exe_name)
170-
if not python_exe:
171-
msg = f"Couldn't find {python_exe_name} on the PATH"
172-
raise errors.FatalError(msg)
173-
174169
# Create virtual environment
170+
python_exe = create_python_build_standalone_environment(
171+
config.version, build_path, CIBW_CACHE_PATH
172+
)
175173
venv_dir = build_path / "venv"
176174
dependency_constraint = build_options.dependency_constraints.get_for_python_version(
177175
version=config.version, tmp_dir=build_path
178176
)
179177
build_env = virtualenv(
180-
config.version,
181-
Path(python_exe),
182-
venv_dir,
183-
dependency_constraint,
184-
use_uv=False,
178+
config.version, python_exe, venv_dir, dependency_constraint, use_uv=False
185179
)
186180

187181
# Apply custom environment variables, and check environment is still valid

docs/platforms.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ needs.
200200

201201
It also requires the following commands to be on the `PATH`:
202202

203-
* `pythonX.Y`, where `X.Y` is the version of Python you're building for.
204203
* `curl`
205204
* `java` (or set the `JAVA_HOME` environment variable)
206205

0 commit comments

Comments
 (0)