Metadata-Version: 2.4
Name: xbuild
Version: 0.4.0
Summary: A PEP517 build frontend for cross-compiling wheels.
Author-email: Russell Keith-Magee <russell@keith-magee.com>
Maintainer-email: Russell Keith-Magee <russell@keith-magee.com>
License-Expression: BSD-3-Clause
Project-URL: Project, https://github.com/beeware/xbuild
Project-URL: Documentation, https://xbuild.beeware.org/
Project-URL: Funding, https://beeware.org/contributing/membership/
Project-URL: Tracker, https://github.com/beeware/xbuild/issues
Project-URL: Source, https://github.com/beeware/xbuild
Keywords: pep517,build
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3.15
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: System :: Software Distribution
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: build>=1.6.0
Requires-Dist: dependency-groups
Requires-Dist: platformdirs
Requires-Dist: filelock
Provides-Extra: uv
Requires-Dist: build[uv]; extra == "uv"
Provides-Extra: keyring
Requires-Dist: build[keyring]; extra == "keyring"
Provides-Extra: virtualenv
Requires-Dist: build[virtualenv]; extra == "virtualenv"
Dynamic: license-file

# xbuild

[![Python Versions](https://img.shields.io/pypi/pyversions/xbuild.svg)](https://pypi.python.org/pypi/xbuild) [![PyPI Version](https://img.shields.io/pypi/v/xbuild.svg)](https://pypi.python.org/pypi/xbuild) [![Maturity](https://img.shields.io/pypi/status/xbuild.svg)](https://pypi.python.org/pypi/xbuild) [![BSD License](https://img.shields.io/pypi/l/xbuild.svg)](https://github.com/beeware/xbuild/blob/master/LICENSE) [![Discord server](https://img.shields.io/discord/836455665257021440?label=Discord%20Chat&logo=discord&style=plastic)](https://beeware.org/bee/chat/)

`xbuild` is [PEP 517](https://peps.python.org/0517) build frontend that has additions and extensions to support cross-compiling wheels for platforms where compilation cannot be performed natively - most notably Android and iOS. Initial experimental support also exists for Emscripten (WASM).

## 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:

```console
$ 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, specifying the platform and architecture you want to target.

```console
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ python -m pip install xbuild
(venv) $ python -m xvenv --platform ios --arch arm64-iphonesimulator x-venv
```

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

## Documentation

Documentation for `xbuild` can be found on [Read The Docs](https://xbuild.beeware.org/).

## Community

`xbuild` is part of the [BeeWare suite](http://beeware.org). You can talk to the community through:

- [@beeware@fosstodon.org on Mastodon](https://fosstodon.org/@beeware)
- [Discord](https://beeware.org/bee/chat/)

We foster a welcoming and respectful community as described in our [BeeWare Community Code of Conduct](http://beeware.org/community/behavior/).

## Contributing

If you experience problems with `xbuild`, [log them on GitHub](https://github.com/beeware/xbuild/issues). If you want to contribute code, please [fork the code](https://github.com/beeware/xbuild) and [submit a pull request](https://github.com/beeware/xbuild/pulls).
