Z Cross Build Environment
Introduction
The Z cross build environment is a tool for managing cross-compile environments. It comes with concurrent building, dependency tracking and other useful features.
Usage
Installation
ZCBE is available on PyPI:
pip install zcbe
Tutorial
-
Understanding concepts:
- A "build" is an environment with multiple projects.
- A "project" is a single package. They may depend on other projects.
-
The first step is to create a basic directory structure. ZCBE uses TOML as its configuration language.
. |-- build.toml |-- mapping.toml |-- zcbe/ |-- PROJECT.zcbe/ |-- conf.toml |-- build.sh |-- ...The sources of projects can be anywhere. But generally it's suggested that you put them somewhere under the build's root directory.
-
Then we can populate the configurations.
build.toml: This file describes how to prepare environment. For example, the installation prefix and host triplets are set in this file. Go totemplates/build.tomlfor an example.mapping.toml: This file sets the working directory for each projects. This directory can be absolute or relative to build root. An example is attemplates/mapping.toml.zcbe/*.zcbe: Each project has a subdirectory here for holding their configuration, scripts and data.zcbe/*.zcbe/conf.toml: This file contains the information about a project. The dependencies are specified here. An example is also available attemplates/conf.toml.zcbe/*.zcbe/build.sh: This is the build script.
-
Start building!
- To build a single project and its dependencies, run
zcbe <NAME>. - To build everything, pass
-a. - To silence
stdout, pass-s. - By default only one process is run at a time. To build concurrently, pass
-j <N>.
See CLI Usage Section for a complete list of options.
- To build a single project and its dependencies, run
Contribution
For security-related issues, see SECURITY.md.
Contributions are very welcome on GitHub. Please try to follow PEP-8 coding guidelines and make sure test suites pass before submitting.
For new features and bug fixes, corresponding tests must be added.
The license is Apache-2.0.
Usage References and Specifications
CLI Usage
usage: zcbe [-h] [-w] [-W WARNING] [-B] [-C CHDIR] [-o FILE] [-e FILE]
[-f FILE] [-p PREFIX] [-t TARGET_TRIPLET] [-m BUILD_NAME]
[-j JOBS] [-a] [-s] [-n] [-u] [-y] [-H ABOUT]
[PROJ ...]
The Z Cross Build Environment
positional arguments:
PROJ List of projects to build
optional arguments:
-h, --help show this help message and exit
-w Suppress all warnings
-W WARNING Modify warning behavior
-B, --rebuild, --always-make, --always-build
Force build requested projects and dependencies
-C CHDIR, --chdir CHDIR, --directory CHDIR
Change directory to
-o FILE, --stdout-to FILE
Redirect stdout to FILE ('{n}' expands to the name of
the project)
-e FILE, --stderr-to FILE
Redirect stderr to FILE ('{n}' expands to the name of
the project)
-f FILE, --file FILE, --build-toml FILE
Read FILE as build.toml
-p PREFIX, --prefix PREFIX, --override-prefix PREFIX
Override value for prefix
-t TARGET_TRIPLET, --target-triplet TARGET_TRIPLET, --override-target TARGET_TRIPLET
Override value for target triplet
-m BUILD_NAME, --build-name BUILD_NAME, --override-build-name BUILD_NAME
Override value for build name
-j JOBS, --jobs JOBS Number of maximum concurrent jobs
-a, --all Build all projects in mapping.toml
-s, --silent Silence make standard output(short for -o /dev/null)
-n, --dry-run, --just-print, --recon
Don't actually run any commands
-u, --show-unbuilt List unbuilt projects and exit
-y, --yes Assume yes for all questions
-H ABOUT, --about ABOUT
Help on a topic("topics" for a list of topics)
Environment Specification
In the build script, there are three environment variables set by ZCBE:
ZCTOP: full path to the root of the build. That is, wherezcbeis invoked or where the-Coption points.ZCPREF: full path to the installation prefix.ZCHOST: GNU host triplet to cross compile for.
build.toml Specification
Tables:
info: required.
Keys:build_name: name of this build environment. Required unless-mcommand-line option is set.prefix: installation prefix. Required unless-pcommand-line option is set.hostname: GNU triplet of the cross toolchain. Required unless-tcommand-line option is set.mapping: Override path tomapping.toml. Optional. The default value is"mapping.toml".
env: optional. Contains any number of environmental variables which will be set for all projects.deps: optional.
Keys:build: List of global build-time dependencies. Optional.
mapping.toml Specification
Tables:
mapping: required. Contains any number of key-value mappings from the project name to the project path, either absolute or relative to build root.
conf.toml Specification
Tables:
package: required.
Keys:name: name of this project. Required.ver: version of this project. Required.
env: optional. Contains any number of environmental variables which will be set for only this projects.deps: optional.
Keys:build: List of build-time dependencies. Optional.req: List of dependencies on other projects. Optional.
Metadata
Release files for zcbe 0.5.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zcbe-0.5.1.tar.gz | 23.0 kB | Without provenance | Details for zcbe-0.5.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zcbe-0.5.1-py3-none-any.whl | Python 3 | none | any | Details for zcbe-0.5.1-py3-none-any.whl |
Total release size: 44.8 kB
Release files / zcbe-0.5.1.tar.gz
| Download URL | zcbe-0.5.1.tar.gz |
|---|---|
| Size | 23.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84601f01bc12f6d0b4aa90c345d69a1c785e7dad9d2f874b0278ca793f79c0d2
|
|
BLAKE2b-256 checksum How to use checksums |
16cd0975f326f7c634cf204ec4b5bf45d165c36274ef8be3d4cc8248fa8e6a5a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / zcbe-0.5.1-py3-none-any.whl
| Download URL | zcbe-0.5.1-py3-none-any.whl |
|---|---|
| Size | 21.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64072cd1712acf26534170d7c9b7a4e0e6d50a9532075ec728ff9e1b5c300841
|
|
BLAKE2b-256 checksum How to use checksums |
497200330f6f42495508e50fdd5df1089ed9824373c8a0f3fdc03597d19684f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Security for zcbe 0.5.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.