Skip to content

Migrate pyproject.toml to PEP 621 [project] for native uv support #18

Description

@bburda

Summary

The README documents installing and running the server with uv and uvx, but pyproject.toml still uses the legacy Poetry tables ([tool.poetry]) with no PEP 621 [project] section. uv reads dependencies from [project], so the native uv workflows do not work:

  • uv sync resolves nothing (no [project.dependencies]), leaving an empty environment.
  • uv run <script> re-syncs to that empty state and fails (works only with --no-sync after a manual uv pip install).
  • uvx ros2-medkit-mcp-stdio by package name is not possible.

Current uv usage therefore goes through uv pip install -e . and uvx --from git+..., which work but are not the standard uv entry points.


Proposed solution

Move the project metadata to PEP 621 [project] while keeping the Poetry build backend (Poetry 2.x reads [project]):

  • [tool.poetry.dependencies] -> [project.dependencies], with requires-python.
  • [tool.poetry.group.dev.dependencies] -> a dev [project.optional-dependencies] extra (or [dependency-groups]).
  • [tool.poetry.scripts] -> [project.scripts] (ros2-medkit-mcp-stdio, ros2-medkit-mcp-http).
  • Keep build-backend = "poetry.core.masonry.api".

The GitHub-release client wheel needs the PEP 621 direct-reference form, e.g.
ros2-medkit-client @ https://github.com/selfpatch/ros2_medkit_clients/releases/download/py-v0.5.0/ros2_medkit_client-0.5.0-py3-none-any.whl.

After this, uv sync, uv run, and uvx --from git+... <script> all work natively, and the README can drop the uv pip install / --no-sync caveats.


Additional context

  • Must keep poetry install / poetry run working (CI uses Poetry). Poetry 2.x supports [project], so verify on the CI Poetry version and regenerate poetry.lock.
  • Verify the client URL dependency still resolves under both uv and Poetry.
  • Follow-up to the README uv/uvx documentation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions