Skip to content

Allow installing individual backend.ai-* packages from source (PEP 517) #11658

@rapsealk

Description

@rapsealk

Problem

Downstream projects that depend on published backend.ai-* distributions (e.g. backend.ai-client, backend.ai-logging) can currently only install them from PyPI. There is no supported way to install an individual package from a git checkout or source tree, so a consumer cannot build against an unreleased change — it has to wait for the next PyPI release.

Root cause

The repository builds with Pants. Each distribution directory (src/ai/backend/client, src/ai/backend/logging, …) contains only a BUILD file with python_sources + python_distribution targets — there is no pyproject.toml or setup.py. Standard PEP 517 tooling (pip, uv) cannot build these directories.

A uv git source pointing at a package subdirectory fails:

× Failed to download and build `backend-ai-logging @ git+https://github.com/lablup/backend.ai@main#subdirectory=src/ai/backend/logging`
╰─▶ .../src/ai/backend/logging does not appear to be a Python project,
    as neither `pyproject.toml` nor `setup.py` are present in the directory

The root pyproject.toml declares a single backend.ai project (and has no [build-system] table), so it does not produce the individually-named distributions either.

Request

Make individual backend.ai-* distributions installable from source via standard PEP 517 tooling — for example, add a per-package pyproject.toml alongside each python_distribution BUILD target so that pip install ./src/ai/backend/client and uv git+subdirectory sources work.

Note that transitive dependencies (backend.ai-common, backend.ai-cli, backend.ai-plugin) would need the same treatment, so a source install of backend.ai-client / backend.ai-logging resolves consistently rather than mixing a source build with PyPI-pinned internals.

Why

This lets downstream consumers develop and test against unreleased upstream changes without waiting for a PyPI release, removing a significant lag from their development cycle.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions