Update Android test-command handling (#2590)

* Update Android test-command handling

* Update to Python 3.13.8

* Update documentation and tests

* Deal with `sysconfig.get_config_var("exec_prefix")` changing in Python 3.14, and add cross venv tests

* Allow test commands starting with `python3`

* test-command cleanups

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Malcolm Smith
2025-10-25 15:29:52 +01:00
committed by GitHub
co-authored by pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent 8165422c41
commit 362020b1c7
7 changed files with 130 additions and 62 deletions
+6 -5
View File
@@ -1318,7 +1318,7 @@ The available Pyodide versions are determined by the version of `pyodide-build`
### `test-command` {: #test-command env-var toml}
> The command to test each built wheel
Shell command to run tests after the build. The wheel will be installed
Command to run tests after the build. The wheel will be installed
automatically and available for import from the tests. If this variable is not
set, your wheel will not be installed after building.
@@ -1346,11 +1346,12 @@ tree. To access your test code, you have a couple of options:
On all platforms other than Android and iOS, the command is run in a shell, so you can write things like `cmd1 && cmd2`.
On Android and iOS, the command is parsed by `shlex.split`, and is required to
be in one of the following forms:
On Android and iOS, the command is parsed by `shlex.split`, and must be a Python
command:
* `python -c command ...` (Android only)
* `python -m module-name ...`
* On Android, the command must must begin with `python` or `python3`, and contain `-m`
or `-c`.
* On iOS, the command must begin with `python -m`.
Platform-specific environment variables are also available:<br/>
`CIBW_TEST_COMMAND_MACOS` | `CIBW_TEST_COMMAND_WINDOWS` | `CIBW_TEST_COMMAND_LINUX` | `CIBW_TEST_COMMAND_ANDROID` | `CIBW_TEST_COMMAND_IOS` | `CIBW_TEST_COMMAND_PYODIDE`