Skip to content

xbuild

Python Versions PyPI Version Maturity BSD License Discord server

xbuild is PEP 517 build frontend that has additions and extensions to support cross-compiling wheels for platforms where compilation cannot be performed natively - most notably:

  • Android
  • Emscripten (WASM)
  • iOS

Quickstart

xbuild

Create a virtual environment for your build platform (i.e., the platform where you will be compiling), and install xbuild. Then, run xbuild from the root directory of the project you want to build. You must pass in the --sysconfig argument, providing the path to the sysconfig_vars JSON file for the target platform, or the equivalent sysconfigdata python configuration:

$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ python -m pip install xbuild
(venv) $ python -m xbuild --sysconfig path/to/_sysconfig_vars__...json

This will do the equivalent of python -m build, but in an cross-platform environment that is pretending to be the environment described by the sysconfig data that has been provided.

xvenv

To explicitly create a cross-platform virtual environment, start by creating a virtual environment for your build platform (i.e., the platform where you will be compiling), then install and use the xvenv script to create cross-platform virtual environment.

$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ python -m pip install xbuild
(venv) $ python -m xvenv --sysconfig path/to/_sysconfig_vars__...json x-venv

You can then activate and deactivate the x-venv environment as you would any other virtual environment.

Documentation

Documentation for Toga Chart can be found on Read The Docs.

Community

xbuild is part of the BeeWare suite. You can talk to the community through:

We foster a welcoming and respectful community as described in our BeeWare Community Code of Conduct.

Contributing

If you experience problems with xbuild, log them on GitHub. If you want to contribute code, please fork the code and submit a pull request.

About

A PEP517 build frontend for cross-compiling wheels.

Resources

Code of conduct

Contributing

Security policy

Stars

12 stars

Watchers

6 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages