framework/cpython/README.md
This Bash script is used to build Embedded CPython and/or its dependencies for Wazuh using a preconfigured Docker container.
It automatically detects the host architecture, pulls the correct image from GitHub Container Registry (GHCR), and runs the compilation process inside the container.
amd64 / arm64)VERSION.jsoncompile.sh build script inside the container./output directoryThe following variables must be defined before running the script, either in the environment or in a config.env file:
GITHUB_USER – GitHub usernameGHCR_TOKEN – GitHub token with permission to pull images from GHCRExample config.env file:
GITHUB_USER=my-github-user
GHCR_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx
| Variable | Value | Description |
|---|---|---|
WAZUH_BRANCH | <branch> | Wazuh branch to use during the build. Optional to not use local code. |
BUILD_CPYTHON | true/false | Enables CPython build |
BUILD_DEPS | true/false | Enables dependency build |
Example:
WAZUH_BRANCH=enhancement/my-branch
BUILD_CPYTHON=true
BUILD_DEPS=true
From the directory where the script is located:
BUILD_CPYTHON=[true/false] BUILD_DEPS=[true/false] WAZUH_BRANCH=[wazuh-branch] ./generate-cpython.sh
The script will:
./outputAll build artifacts are written to ./output/ with the following naming convension:
cpython_[amd64/x86_64].tar.gzcpython.tar.gzUnsupported architecture
The script exits if uname -m is not amd64/x86_64 or arm64/aarch64
Missing credentials
If GITHUB_USER or GHCR_TOKEN are not set, the script exits immediately