Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:18:02

0001 #!/usr/bin/env bash
0002 # Builds ACTS Python wheels via cibuildwheel with the project's standard
0003 # CIBW_* configuration. All arguments are forwarded to cibuildwheel
0004 # unchanged (e.g. a package-dir positional, --only, --output-dir, ...).
0005 # Anything else is configured via environment variables: CIBW_BUILD selects
0006 # which target(s) to build and must be set by the caller; GITHUB_TOKEN is
0007 # forwarded into the build environment if set.
0008 set -euo pipefail
0009 
0010 if [[ -z "${CIBW_BUILD:-}" ]]; then
0011   echo "CIBW_BUILD must be set" >&2
0012   exit 1
0013 fi
0014 
0015 CI="${CI:-true}"
0016 export CI
0017 # Resolved on the host so both platforms agree on where the cache lives.
0018 CCACHE_DIR="${CCACHE_DIR:-$PWD/ccache}"
0019 export CCACHE_DIR
0020 export CIBW_MANYLINUX_X86_64_IMAGE="manylinux_2_34" # based on almalinux9
0021 export CIBW_SKIP="*-musllinux* *-manylinux_i686"
0022 SETUP_CMD="bash {package}/CI/dependencies/setup.sh -t v23.3.1 -d deps -e env.sh"
0023 export CIBW_BEFORE_ALL_LINUX="dnf install -y bc ccache && ${SETUP_CMD}"
0024 export CIBW_BEFORE_ALL_MACOS="brew install ninja ccache && ${SETUP_CMD}"
0025 export CIBW_ENVIRONMENT="GITHUB_TOKEN=${GITHUB_TOKEN:-}"
0026 export CIBW_ENVIRONMENT_PASS="CI"
0027 export CIBW_BEFORE_BUILD="ccache -z"
0028 export CIBW_ENVIRONMENT_LINUX="CMAKE_PREFIX_PATH=\$PWD/deps/venv:\$PWD/deps/view CCACHE_DIR=/host${CCACHE_DIR} LD_LIBRARY_PATH=\$PWD/deps/view/lib64:\$PWD/deps/view/lib:\$PWD/deps/venv/lib64:\$PWD/deps/venv/lib"
0029 export CIBW_ENVIRONMENT_MACOS="CMAKE_PREFIX_PATH=\$PWD/deps/venv:\$PWD/deps/view CCACHE_DIR=${CCACHE_DIR} MACOSX_DEPLOYMENT_TARGET=26.0"
0030 export CIBW_BEFORE_TEST="ccache -s && uv pip install -r {package}/Python/Examples/tests/requirements.txt"
0031 export CIBW_TEST_COMMAND="pytest {package}/Python/Examples/tests -m pypi -v"
0032 # patchelf 0.17.2 (pinned in the manylinux image) corrupts auditwheel-vendored
0033 # libs (e.g. libzstd) it repairs, causing a segfault at import time. Force a
0034 # newer patchelf until manylinux ships a stable release with the fix.
0035 export CIBW_REPAIR_WHEEL_COMMAND_LINUX="pipx install --force --pip-args='--pre' patchelf==0.19.0.0rc1 && auditwheel repair -w {dest_dir} {wheel}"
0036 
0037 uv tool run cibuildwheel==3.4.1 "$@"