Core is a fork of Apollo cyber, a publish-subscribe system used as middleware for autonomous driving.
Latency of publish and subscribe messages.
sudo bash scripts/deploy/build.sh
bash scripts/build.sh
For the Ubuntu 22.04 baseline used by CI and release validation, run:
bash scripts/release/ubuntu2204_baseline.sh
To verify or refresh the Bzlmod lockfile:
bash scripts/release/check_bzlmod_lockfile.sh --check
bash scripts/release/check_bzlmod_lockfile.sh --update
For a narrower pycyber-focused build/test loop, use the existing Bazel targets directly:
bazel test --color=no --curses=no \
//cyber/python/cyber_py3/test:all \
//cyber/python/cyber_py3/examples:examples_smoke_test
Set Environment Variable
source scripts/env/runtime.bash
Run the Publisher and Subscriber
./bazel-bin/cyber/examples/listener to start the subscriber program../bazel-bin/cyber/examples/talker to start the publisher program.Check the log in data/log
Recommended: use the included one-step packaging script which stages, builds, repairs and validates the wheel. Always run packaging inside an isolated Python environment (venv) or a clean container to avoid dependency conflicts.
For a full release-oriented artifact build that also collects the wheelos_core package outputs, run:
bash scripts/release/build_release_artifacts.sh
Quick start (recommended)
python3.11 -m venv .packaging-venv
source .packaging-venv/bin/activate
python -m pip install --upgrade pip
pip install build auditwheel twine setuptools_scm
# On Linux, also install patchelf
sudo apt-get update && sudo apt-get install -y patchelf
pycyber-v*:# Preferred: use tag-derived version (make and push a tag first)
./scripts/release/build_and_package_pycyber.sh
# Or override version explicitly:
PYCYBER_VERSION=0.0.7 ./scripts/release/build_and_package_pycyber.sh
Artifacts and checks:
packaging/pycyber/wheelhouse/.packaging/pycyber/{staging,build,dist,wheelhouse} are generated packaging outputs; keep the checked-in sources under packaging/pycyber/ and scripts/release/ as the canonical release inputs.twine check and the repository's validate_pycyber.py smoke test.SHA256SUMS file is created in the wheelhouse; upload only *.whl and *.tar.gz to PyPI.x86_64 and aarch64, built with CPython 3.11 as cp311 platform wheels.Script flags:
--skip-auditwheel : Skip auditwheel repair (useful on non-Linux machines).--skip-validate : Skip running the smoke validation.--skip-sdist : Only build wheel, skip sdist.--skip-build : Skip staging (build_pycyber.py), useful if staging already exists.--outdir DIR : Write artifacts to a custom directory.Manual (step-by-step) packaging
If you prefer to run the steps manually, follow these commands (run inside a clean venv / container):
python scripts/release/build_pycyber.py
python -m build --sdist --wheel --outdir packaging/pycyber/dist packaging/pycyber
auditwheel repair packaging/pycyber/dist/*.whl -w packaging/pycyber/wheelhouse
python -m twine check packaging/pycyber/wheelhouse/*.whl packaging/pycyber/wheelhouse/*.tar.gz
python scripts/release/validate_pycyber.py --wheel packaging/pycyber/wheelhouse/*.whl
TWINE_USERNAME=__token__ TWINE_PASSWORD=$TEST_PYPI_TOKEN \
python -m twine upload --repository testpypi packaging/pycyber/wheelhouse/*.whl packaging/pycyber/wheelhouse/*.tar.gz
# Test install from TestPyPI in a fresh venv:
pip install --index-url https://test.pypi.org/simple/ --no-deps pycyber==0.0.7
TWINE_USERNAME=__token__ TWINE_PASSWORD=$PYPI_TOKEN \
python -m twine upload packaging/pycyber/wheelhouse/*.whl packaging/pycyber/wheelhouse/*.tar.gz
Versioning
pyproject.toml is configured to use setuptools_scm with the tag pattern ^pycyber-v(?P<version>.+)$.git tag -a pycyber-v1.2.3 -m "Release 1.2.3"
git push origin --tags
PYCYBER_VERSION.Troubleshooting
streamlit vs protobuf) occur when build tools are installed into the global Python environment. Always use a clean virtualenv (venv) or container for packaging.cibuildwheel or the official manylinux Docker images: https://github.com/pypa/manylinuxauditwheel cannot patch RPATH because patchelf is missing, install patchelf (Debian/Ubuntu: apt-get install -y patchelf) or run the packaging inside an appropriate Linux build environment.Security and best practices
__token__) with minimal scope; store tokens as secrets in CI.SHA256SUMS to GitHub Releases.CI
.github/workflows/c-cpp.yml runs the Ubuntu 22.04 Bzlmod baseline entrypoint..github/workflows/release-pycyber.yml is triggered by tags pycyber-v*. It checks out the full history (fetch-depth: 0) so setuptools_scm can compute versions correctly, builds release artifacts on x86_64 and aarch64, then verifies wheel install/import on CPython 3.11 before publish.