Skip to content

Support index declarations in uv publish #8864

@konstin

Description

@konstin

We want to support uv publish --index example with:

[[index]]
name = "example"
url = "https://pypi.org/simple"
publish-url = "https://upload.pypi.org/legacy"

This avoids setting the options on the CLI, moving them into configuration stored with the project instead.

It requires changing uv publish so that if --index <name> is given, we discover (and require) pyproject.toml to be present.

See also #8531 (comment)

Todo list:

  • Add publish-url option to [[index]]
  • Add --index option, conflicting with --publish-url and --check-url.
  • When using --index, perform workspace discovery, find a matching index and use that
  • Update the docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or improvement to existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions