Skip to content

[BUG] Python wheel missing generated code (_generated/ not included) #11

@bburda

Description

@bburda

Bug report

Steps to reproduce

  1. Build wheel: cd clients/python && python -m build
  2. Inspect contents: python -m zipfile -l dist/*.whl

Expected behavior

Wheel contains ros2_medkit_client/_generated/ with all generated API and model code.

Actual behavior

Wheel is missing _generated/ entirely. The api/*.py modules import from _generated and fail with ModuleNotFoundError at runtime.

Root cause

_generated is a symlink (_generated -> ../../generated). Hatchling does not follow symlinks outside the package directory when building the wheel.

Fix

In the publish CI job, replace ln -sf with cp -r so the generated code is physically present inside the package directory before building.

Also in build-and-test job, use cp -r for consistency - symlink works for local dev but not for wheel builds.

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions