Skip to content
Skills Library
Programming · Building & coding

python-packaging

/python-packaging

Build and publish Python packages with uv. Use when the user mentions building packages, publishing to PyPI, wheel/sdist creation, or entry points.

Licence
MIT
Last repository change
24.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
10
Deprecation

No signals detected. Repository changed on 24.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Build and publish Python packages with uv. Use when the user mentions building packages, publishing to PyPI, wheel/sdist creation, or entry points.

Original author description

Build and publish Python packages with uv. Use when the user mentions building packages, publishing to PyPI, wheel/sdist creation, or entry points.

How it works

  1. When to Use This Skill
  2. When This Skill Applies
  3. Quick Reference
  4. pyproject.toml Configuration
  5. Versioning
  6. Entry Points
  7. Build Backends
  8. Common Workflows
  9. Package Classifiers
  10. See Also
Original SKILL.md headings · 231 lines, 578 words
SKILL.md preview
---
created: 2025-12-16
modified: 2026-05-09
reviewed: 2026-04-25
name: python-packaging
description: Build and publish Python packages with uv. Use when the user mentions building packages, publishing to PyPI, wheel/sdist creation, or entry points.
user-invocable: false
allowed-tools: Bash, Read, Grep, Glob
---

# Python Packaging

Quick reference for building and publishing Python packages with UV and modern build tools.

## When to Use This Skill

| Use this skill when... | Use uv-project-management instead when... |
|---|---|
| Building a wheel/sdist with `uv build` for PyPI distribution | Setting up a new project's pyproject.toml or adding runtime dependencies |
| Publishing a release to PyPI or a private index with `uv publish` | Managing the lockfile or syncing the local virtual environment |
| Configuring entry points, console scripts, or package metadata for distribution | Resolving dependency conflicts or pinning versions for development |

## When This Skill Applies

- Building Python packages (wheels, sdists)
- Publishing to PyPI or private indexes
- Package versioning
- Build system configuration
- Editable installations

## Quick Reference

### Building Packages

```bash
# Build package
uv build

# Build specific formats
uv build --wheel
uv build --sdist

# Output location: dist/
```

### Publishing

```bash
# Publish to PyPI
uv publish

# With token
uv publish --token $PYPI_TOKEN

# To Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/
```

### Package Structure

```
my-package/
├── pyproject.toml
├── README.md
├── LICENSE
├── src/
│   └── my_package/
│       ├── __init__.py
│       ├── __version__.py
│       └── main.py
└── tests/
```

## pyproject.toml Configuration

```toml
[project]
name = "my-package"
version = "0.1.0"
description = "A great package"
readme = "README.md"
requires-python = ">=3.11"
license = {text = "MIT"}
authors = [
    {name = "Your Name", email = "you@example.com"}
]
keywords = ["python", "package"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
]

dependencies = [
    "requests>=2.31.0",
]

[project.optional-dependencies]
dev = ["pytest", "ruff", "ty"]

[project.urls]
Homepage = "https://github.com/user/my-package"
Documentation = "https://my-package.readthedocs.io"
Repository = "https://github.com/user/my-package.git"
Issues = "https://github.com/user/my-package/issues"

[project.scripts]
my-cli = "my_package.cli:main"

[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
```

## Versioning

```toml
[project]
version = "0.1.0"  # Manual versioning

# Dynamic versioning (from git tags)
dynamic = ["version"]

[tool.uv]
version-provider = "git"
```

## Entry Points

```toml
[project.scripts]
my-cli = "my_package.cli:main"

[project.gui-scripts]
my-gui = "my_package.gui:main"

[project.entry-points."my_plugin"]
plugin1 = "my_package.plugins:plugin1"
```

## Build Backends

### UV Build (default)

```toml
[build-system]
requires = ["uv_build>=0.9.2,<0.10.0"]
build-backend = "uv_build"
```

### Setuptools

```toml
[build-system]
requires = ["setuptools>=68", "wheel"]
build-backend = "setuptools.build_meta"
```

### Hatchling

```toml
[build-system]
requires = ["hatchling>=1.18"]
build-backend = "hatchling.build"
```

## Common Workflows

### Publish to PyPI

```bash
# 1. Build
uv build

# 2. Check built packages
ls dist/

# 3. Publish
uv publish --token $PYPI_TOKEN
```

### Test PyPI First

```bash
# Publish to Test PyPI
uv publish --publish-url https://test.pypi.org/legacy/ \
           --token $TEST_PYPI_TOKEN

# Test installation
pip install --index-url https://test.pypi.org/simple/ my-package
```

## Package Classifiers

Common classifiers:

```toml
classifiers = [
    # Development Status
    "Development Status :: 3 - Alpha",
    "Development Status :: 4 - Beta",
    "Development Status :: 5 - Production/Stable",

    # Audience
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",

    # License
    "License :: OSI Approved :: MIT License",

    # Python Versions
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",

    # Framework
    "Framework :: Django",
    "Framework :: FastAPI",

    # Topic
    "Topic :: Software Development :: Libraries",
    "Topic :: Scientific/Engineering",
]
```

Full list: https://pypi.org/classifiers/

## See Also

- `uv-project-management` - Project setup and dependencies
- `python-development` - Core Python patterns
- `uv-workspaces` - Building workspace packages

## References

- UV build: https://docs.astral.sh/uv/guides/publish/
- PyPI: https://pypi.org/
- Detailed guide: See REFERENCE.md
Files in this package (2)
  • REFERENCE.md 2 KB
  • SKILL.md 5 KB

Versions

RepositoryScoreLicence
This page · laurigates/claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
acaprino/alfio-claude-plugins100MIT
rootcastleco/rei-skills100MIT
wshobson/agents100MIT

Database snapshot: 13.11.2026 · package version 25e03c4c2926 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95packaging-python-libraries
    Packages and distributes Python libraries using modern pyproject.toml, build backends (setuptools, hatchling), PyPI publishing with trusted publishing, and wheel building. Use when packaging libraries for distribution, publishing to PyPI, or troubleshooting packaging issues.
  • 95pypi-library
    Design and verify a Python library's package metadata, public imports, wheel/sdist artifacts and OIDC trusted release process with uv and Ruff. Use for library authoring or a complete PyPI publication review.
  • 100python-packaging-complexity
    Use this skill to analyze Python package build complexity by inspecting PyPI metadata. Evaluates compilation requirements, dependencies, distribution types, and provides recommendations for wheel building strategies.
  • 100poetry
    Manage Python projects with Poetry. Use when a user asks to manage Python dependencies, create virtual environments, publish packages to PyPI, handle dependency resolution, or set up a Python project structure.
  • 95project-system
    Guidance for Python project configuration and packaging using pyproject.toml, build backends, and modern PEP standards. USE FOR: creating pyproject.toml, configuring build backends (setuptools, hatchling, flit-core, maturin, poetry-core, pdm-backend), entry points, version…
  • 100publishing-npm-pypi-developer-libraries
    Use this skill when packaging, testing, versioning, and publishing open-source developer libraries to npm and PyPI registries.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.