# Python Packaging Uv

> Use when building or publishing Python packages with uv, including dist artifacts and pre-publish checks.

- Skill: `tomevault-io/python-packaging-uv` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/python-packaging-uv`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/python-packaging-uv/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/python-packaging-uv

---


# Python Packaging with uv

## Overview

Use uv build and publish commands to produce wheels/sdists and ship to PyPI. Core principle: build, verify, then publish.

## Quick Reference

| Task | Command |
| --- | --- |
| Build wheel+sdist | `uv build` |
| Build wheel only | `uv build --wheel` |
| Build for release (ignore local path overrides) | `uv build --no-sources` |
| Publish to PyPI | `uv publish --token $PYPI_TOKEN` |
| Publish to Test PyPI | `uv publish --publish-url https://test.pypi.org/legacy/ --token $TEST_PYPI_TOKEN` |

## Workflow

1. Build artifacts in `dist/`.
2. Test install from wheel.
3. Publish to Test PyPI, validate, then publish to PyPI.

## Example

```bash
uv build --no-sources
uv pip install dist/my_package-1.0.0-py3-none-any.whl
uv publish --publish-url https://test.pypi.org/legacy/ --token $TEST_PYPI_TOKEN
```

## Common Mistakes

- Publishing before verifying wheel contents.
- Skipping Test PyPI for first release.

## Red Flags

- Packaging guidance that ignores uv build/publish.

## References

- `references/packaging.md` - Build and publish details

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/narumiruna) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

