{"id":15297486,"url":"https://github.com/myzhang1029/zcbe","last_synced_at":"2025-07-15T19:08:21.036Z","repository":{"id":57478105,"uuid":"125685606","full_name":"myzhang1029/zcbe","owner":"myzhang1029","description":"The Z cross build environment","archived":false,"fork":false,"pushed_at":"2025-05-09T04:36:36.000Z","size":232,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-11T02:07:04.324Z","etag":null,"topics":["cross","cross-compile","python","python-3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/myzhang1029.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-03-18T02:18:28.000Z","updated_at":"2025-05-09T04:36:39.000Z","dependencies_parsed_at":"2025-05-04T06:34:34.705Z","dependency_job_id":null,"html_url":"https://github.com/myzhang1029/zcbe","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/myzhang1029/zcbe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhang1029%2Fzcbe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhang1029%2Fzcbe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhang1029%2Fzcbe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhang1029%2Fzcbe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/myzhang1029","download_url":"https://codeload.github.com/myzhang1029/zcbe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/myzhang1029%2Fzcbe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264915485,"owners_count":23682925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cross","cross-compile","python","python-3"],"created_at":"2024-09-30T19:17:48.626Z","updated_at":"2025-07-15T19:08:21.002Z","avatar_url":"https://github.com/myzhang1029.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Z Cross Build Environment\n\n![Python Package](https://github.com/myzhang1029/zcbe/workflows/Python%20package/badge.svg)\n![Upload Python Package](https://github.com/myzhang1029/zcbe/workflows/Upload%20Python%20Package/badge.svg)\n[![codecov](https://codecov.io/gh/myzhang1029/zcbe/branch/master/graph/badge.svg)](https://codecov.io/gh/myzhang1029/zcbe)\n[![Maintainability](https://api.codeclimate.com/v1/badges/e8785246f7dbe7676393/maintainability)](https://codeclimate.com/github/myzhang1029/zcbe/maintainability)\n[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/4158/badge)](https://bestpractices.coreinfrastructure.org/projects/4158)\n\n## Introduction\nThe Z cross build environment is a tool for managing cross-compile environments.\nIt comes with concurrent building, dependency tracking and other useful features.\n\n## Usage\n\n### Installation\nZCBE is available on PyPI:\n```shell\npip install zcbe\n```\n\n### Tutorial\n0. Understanding concepts:\n   - A \"build\" is an environment with multiple projects.\n   - A \"project\" is a single package. They may depend on other projects.\n1. The first step is to create a basic directory structure.\n   ZCBE uses [TOML](https://toml.io/en/) as its configuration language.\n   ```text\n   .\n   |-- build.toml\n   |-- mapping.toml\n   |-- zcbe/\n      |-- PROJECT.zcbe/\n         |-- conf.toml\n         |-- build.sh\n   |-- ...\n   ```\n   The sources of projects can be anywhere. But generally it's suggested that\n   you put them somewhere under the build's root directory.\n2. Then we can populate the configurations.\n   - `build.toml`: This file describes how to prepare environment. For example,\n     the installation prefix and host triplets are set in this file. Go to\n     [`templates/build.toml`](templates/build.toml) for an example.\n   - `mapping.toml`: This file sets the working directory for each projects.\n     This directory can be absolute or relative to build root. An example is\n     at [`templates/mapping.toml`](templates/mapping.toml).\n   - `zcbe/*.zcbe`: Each project has a subdirectory here for holding their\n     configuration, scripts and data.\n   - `zcbe/*.zcbe/conf.toml`: This file contains the information about a project.\n     The dependencies are specified here. An example is also available at\n     [`templates/conf.toml`](templates/conf.toml).\n   - `zcbe/*.zcbe/build.sh`: This is the build script.\n3. Start building!\n   - To build a single project and its dependencies, run `zcbe \u003cNAME\u003e`.\n   - To build everything, pass `-a`.\n   - To silence `stdout`, pass `-s`.\n   - By default only one process is run at a time. To build concurrently, pass\n     `-j \u003cN\u003e`.\n\n   See [CLI Usage Section](#cli-usage) for a complete list of options.\n\n\n## Contribution\nFor security-related issues, see [SECURITY.md](SECURITY.md).\n\nContributions are very welcome on GitHub. Please try to follow PEP-8 coding\nguidelines and make sure test suites pass before submitting.\n\nFor new features and bug fixes, corresponding tests must be added.\n\nThe license is Apache-2.0.\n\n## Usage References and Specifications\n\n### CLI Usage\n```text\nusage: zcbe [-h] [-w] [-W WARNING] [-B] [-C CHDIR] [-o FILE] [-e FILE]\n            [-f FILE] [-p PREFIX] [-t TARGET_TRIPLET] [-m BUILD_NAME]\n            [-j JOBS] [-a] [-s] [-n] [-u] [-y] [-H ABOUT]\n            [PROJ ...]\n\nThe Z Cross Build Environment\n\npositional arguments:\n  PROJ                  List of projects to build\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -w                    Suppress all warnings\n  -W WARNING            Modify warning behavior\n  -B, --rebuild, --always-make, --always-build\n                        Force build requested projects and dependencies\n  -C CHDIR, --chdir CHDIR, --directory CHDIR\n                        Change directory to\n  -o FILE, --stdout-to FILE\n                        Redirect stdout to FILE ('{n}' expands to the name of\n                        the project)\n  -e FILE, --stderr-to FILE\n                        Redirect stderr to FILE ('{n}' expands to the name of\n                        the project)\n  -f FILE, --file FILE, --build-toml FILE\n                        Read FILE as build.toml\n  -p PREFIX, --prefix PREFIX, --override-prefix PREFIX\n                        Override value for prefix\n  -t TARGET_TRIPLET, --target-triplet TARGET_TRIPLET, --override-target TARGET_TRIPLET\n                        Override value for target triplet\n  -m BUILD_NAME, --build-name BUILD_NAME, --override-build-name BUILD_NAME\n                        Override value for build name\n  -j JOBS, --jobs JOBS  Number of maximum concurrent jobs\n  -a, --all             Build all projects in mapping.toml\n  -s, --silent          Silence make standard output(short for -o /dev/null)\n  -n, --dry-run, --just-print, --recon\n                        Don't actually run any commands\n  -u, --show-unbuilt    List unbuilt projects and exit\n  -y, --yes             Assume yes for all questions\n  -H ABOUT, --about ABOUT\n                        Help on a topic(\"topics\" for a list of topics)\n```\n\n### Environment Specification\nIn the build script, there are three environment variables set by ZCBE:\n- `ZCTOP`: full path to the root of the build. That is, where `zcbe` is\n  invoked or where the `-C` option points.\n- `ZCPREF`: full path to the installation prefix.\n- `ZCHOST`: GNU host triplet to cross compile for.\n\n### `build.toml` Specification\nTables:\n- `info`: required.  \n  Keys:\n  - `build_name`: name of this build environment. Required unless `-m`\n    command-line option is set.\n  - `prefix`: installation prefix. Required unless `-p` command-line option is\n    set.\n  - `hostname`: GNU triplet of the cross toolchain. Required unless `-t`\n    command-line option is set.\n  - `mapping`: Override path to `mapping.toml`. Optional. The default value is\n    `\"mapping.toml\"`.\n- `env`: optional. Contains any number of environmental variables which will\n  be set for all projects.\n- `deps`: optional.  \n  Keys:\n  - `build`: List of global build-time dependencies. Optional.\n\n### `mapping.toml` Specification\nTables:\n- `mapping`: required. Contains any number of key-value mappings from the\n  project name to the project path, either absolute or relative to build root.\n\n### `conf.toml` Specification\nTables:\n- `package`: required.  \n  Keys:\n  - `name`: name of this project. Required.\n  - `ver`: version of this project. Required.\n- `env`: optional. Contains any number of environmental variables which will\n  be set for only this projects.\n- `deps`: optional.  \n  Keys:\n  - `build`: List of build-time dependencies. Optional.\n  - `req`: List of dependencies on other projects. Optional.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyzhang1029%2Fzcbe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmyzhang1029%2Fzcbe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmyzhang1029%2Fzcbe/lists"}