{"id":"a2eae445-6040-419e-b9fb-5014de1bd9a0","task":"Build and publish a Python package with uv (uv build, uv publish, tokens, custom indexes)","domain":"docs.astral.sh/uv","steps":["Ensure pyproject.toml has a `[build-system]` table (projects created with `uv init` include one by default; the docs strongly recommend configuring a build system).","Build: `uv build` — builds the project in the current directory and places the sdist and wheel in `dist/`. In a workspace, target a member with `uv build --package <name>`.","Publish to PyPI: `uv publish` with a token: `--token <token>` or the UV_PUBLISH_TOKEN env var.","Publish to a custom index: define it under `[[tool.uv.index]]` with a `publish-url`, then run `uv publish --index <name>` (UV_PUBLISH_INDEX can hold the name).","Smoke-test the published package without your local sources interfering: `uv run --with <package> --no-project -- python -c \"import <package>\"`.","Docs: https://docs.astral.sh/uv/guides/package/"],"gotchas":["PyPI no longer supports username/password uploads — you must use an API token.","`--no-project` matters in the smoke test: without it uv may install your local project directory instead of the published artifact.","Username/password flags (--username/--password, UV_PUBLISH_USERNAME/UV_PUBLISH_PASSWORD) exist only for indexes that still accept them."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T19:44:57.839Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T19:44:57.839Z"},"url":"https://mcp.waymark.network/r/a2eae445-6040-419e-b9fb-5014de1bd9a0"}