Skip to content

fix(packaging): make VCS-built wheels include runtime schemas #1104

Description

@bokelley

Problem

Installing the Python SDK directly from a Git commit produces a wheel with no adcp/_schemas directory.

The repository's release workflows explicitly run python scripts/bundle_schemas.py before python -m build, but a normal PEP 517 VCS install (adcp @ git+https://...@<sha>) invokes the build backend without that repository-specific preparation step. Setuptools therefore sees no package data to include.

Reproduction

  1. Install a Git commit into a clean environment.
  2. Inspect Path(adcp.__file__).parent / "_schemas", or call:
from adcp.types.versioned import make_versioned_base
make_versioned_base("3.1", "ListCreativesRequest")

The schema directory is absent and the call raises:

LookupError: no 3.1 schema for list_creatives::request

The same commit works as an editable checkout because scripts/bundle_schemas.py had already populated the ignored source tree locally. Released PyPI artifacts work because CI runs the bundling step explicitly.

Impact

  • Git-SHA dependency pins are not reproducible for SDK/adopter integration testing.
  • Local editable validation can pass while the exact same commit fails in adopter CI.
  • This blocks testing a protocol PR, SDK PR, and adopter PR together before a prerelease is published.

Proposed acceptance criteria

  • A PEP 517 wheel built from a clean VCS checkout contains the supported 2.5, 3.0, 3.1, and current 3.2 schema bundles without relying on a pre-existing ignored directory.
  • A clean installed wheel resolves a representative versioned 3.1 model and current generated reporting model.
  • Release-built and VCS-built wheels contain the same supported schema-version set.
  • Add a CI smoke that builds from a checkout after ensuring src/adcp/_schemas is absent.

An implementation is being validated in #1095 by copying tracked supported bundles into the wheel build directory from a build_py hook.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions