Skip to content
Merged
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
21 changes: 21 additions & 0 deletions docs/guide/crosscompile.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,27 @@ so FindPython will report the wrong values, but pyodide-build will rename the
pyodide-build will also set `_PYTHON_HOST_PLATFORM` to the target Pyodide
platform, so scikit-build-core can use that to compute the correct wheel name.

## Android

To build for Android, you'll need the following items, all of which will be
provided automatically if you use cibuildwheel:

- A Python environment in which `sys.platform`, `sysconfig`, etc. all simulate
Android.
- A
[`CMAKE_TOOLCHAIN_FILE`](https://cmake.org/cmake/help/latest/envvar/CMAKE_TOOLCHAIN_FILE.html)
environment variable, pointing to a file which does at least the following:
- Set `CMAKE_SYSTEM_NAME`, `CMAKE_SYSTEM_PROCESSOR` and
`CMAKE_SYSTEM_VERSION`.
- Set `CMAKE_FIND_ROOT_PATH` to the location of the Python headers and
libraries.
- Set `CMAKE_CROSSCOMPILING_EMULATOR` to `/bin/sh -c [["$0" "$@"]]`. This
allows CMake to run Python in the simulated Android environment when policy
[CMP0190](https://cmake.org/cmake/help/latest/policy/CMP0190.html) is
active.
- Compiler paths and flags, either in the toolchain file or in environment
variables.

## Manual cross compilation

The manual cross compilation assumes you have [toolchain file] prepared defining
Expand Down
2 changes: 1 addition & 1 deletion docs/guide/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ is missing some value you need, please open an issue and let us know.

## Finding Python

One common mistake when using FindPython is to forget to only request the
When using `find_package(Python ...)`, you should only request the
`Development.Module` component. If you request `Development`, you will also
require the `Development.Embed` component, which will require the Python
libraries to be found for linking. When building a module on Unix, you do not
Expand Down
Loading