Skip to main content

Core

Core is a fork of Apollo cyber, a publish-subscribe system used as middleware for autonomous driving.

Benchmark

Latency of publish and subscribe messages.

How to build

  1. Deploy build env.
sudo bash scripts/deploy/build.sh
  1. Run the build script.
bash scripts/build.sh

For a narrower pycyber-focused build/test loop, use the existing Bazel targets directly:

bazel test --color=no --curses=no \
  //cyber/python/internal:py_cyber_test \
  //cyber/python/internal:py_record_test \
  //cyber/python/cyber_py3/test:init_test \
  //cyber/python/cyber_py3/test:cyber_test \
  //cyber/python/cyber_py3/test:cyber_time_test \
  //cyber/python/cyber_py3/test:record_test

Example

  1. Set Environment Variable

    source scripts/env/runtime.bash
    
  2. Run the Publisher and Subscriber

    • In the first terminal, run ./bazel-bin/cyber/examples/listener to start the subscriber program.
    • In the second terminal, run ./bazel-bin/cyber/examples/talker to start the publisher program.
  3. Check the log in data/log

Build the pycyber wheel

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.

Quick start (recommended)

  1. Create and activate a virtual environment (venv):
python3 -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
  1. Run the one-step packaging script. The script will use PYCYBER_VERSION if set, otherwise it reads the most recent tag matching 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:

  • Artifacts are written to packaging/pycyber/wheelhouse/.
  • The script runs twine check and the repository's validate_pycyber.py smoke test.
  • A SHA256SUMS file is created in the wheelhouse.

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):

  1. Stage the package from Bazel outputs:
python3 scripts/release/build_pycyber.py
  1. Build sdist + wheel:
python3 -m build --sdist --wheel --outdir packaging/pycyber/dist packaging/pycyber
  1. Repair Linux wheels (auditwheel):
auditwheel repair packaging/pycyber/dist/*.whl -w packaging/pycyber/wheelhouse
  1. Check metadata and run validation:
python3 -m twine check packaging/pycyber/wheelhouse/*
python3 scripts/release/validate_pycyber.py --wheel packaging/pycyber/wheelhouse/*.whl
  1. Upload to TestPyPI (recommended first):
TWINE_USERNAME=__token__ TWINE_PASSWORD=$TEST_PYPI_TOKEN \
  python -m twine upload --repository testpypi packaging/pycyber/wheelhouse/*

# Test install from TestPyPI in a fresh venv:
pip install --index-url https://test.pypi.org/simple/ --no-deps pycyber==0.0.7
  1. Final upload to PyPI:
TWINE_USERNAME=__token__ TWINE_PASSWORD=$PYPI_TOKEN \
  python -m twine upload packaging/pycyber/wheelhouse/*

Versioning

  • pyproject.toml is configured to use setuptools_scm with the tag pattern ^pycyber-v(?P<version>.+)$.
  • Preferred release flow: create an annotated tag on the release commit and push it:
git tag -a pycyber-v1.2.3 -m "Release 1.2.3"
git push origin --tags
  • The one-step script will extract the version from the tag automatically. If needed, override with PYCYBER_VERSION.

Troubleshooting

  • pip dependency conflicts (for example: streamlit vs protobuf) occur when build tools are installed into the global Python environment. Always use a clean virtualenv (venv) or container for packaging.
  • For reproducible manylinux wheels and multi-Python builds, use cibuildwheel or the official manylinux Docker images: https://github.com/pypa/manylinux

Security and best practices

  • Use PyPI API tokens (username __token__) with minimal scope; store tokens as secrets in CI.
  • Upload to TestPyPI first to verify installation before publishing to the real PyPI.
  • Tag releases and attach built artifacts and SHA256SUMS to GitHub Releases.
  • Optionally GPG-sign artifacts for extra authenticity.

CI

  • The repository includes .github/workflows/release-pycyber.yml which is triggered by tags pycyber-v*. The workflow checks out the full history (fetch-depth: 0) so setuptools_scm can compute versions correctly.

Metadata

Release files for pycyber 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycyber 0.0.7
File Size Uploaded Provenance
pycyber-0.0.7.tar.gz 33.0 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pycyber 0.0.7
File Interpreter ABI Platform
pycyber-0.0.7-cp310-cp310-manylinux_2_35_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.35+ x86-64 Details

Total release size: 66.5 MB

Release files / pycyber-0.0.7.tar.gz

Download URL pycyber-0.0.7.tar.gz
Size 33.0 MB
Tags Source
SHA-256 checksum
How to use checksums
525d192db7685b911c54aafeffeb7b110301fe6186074c90f9ef204cbc15e4d0
BLAKE2b-256 checksum
How to use checksums
b8627e48adc1d2e19a642032701f0310f509cd488bc7bd40c577c3046f6aaec1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / pycyber-0.0.7-cp310-cp310-manylinux_2_35_x86_64.whl

Download URL pycyber-0.0.7-cp310-cp310-manylinux_2_35_x86_64.whl
Size 33.5 MB
Tags CPython 3.10 Linux glibc 2.35+ x86-64
SHA-256 checksum
How to use checksums
f4b2951cf6bdddfdc0e4e95d344a35aa9c46daac206359353933df82d9571499
BLAKE2b-256 checksum
How to use checksums
d87a7c4d64edaf65d9bcf3479afa75c7191bf7f2579007836a0bb78be99070d7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for pycyber 0.0.7

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page