python-packaging

Create and publish Python packages using pyproject.toml and setuptools.

1|Updated Jun 18, 2025
One-click install
npx skills add https://github.com/knopki/dotfiles --skill python-packaging-knopki
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python-packaging
Source: https://github.com/knopki/dotfiles/tree/main/home/private_dot_config/opencode/skills/python-packaging
Command: npx skills add https://github.com/knopki/dotfiles --skill python-packaging-knopki

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating, structuring, and distributing Python packages, making your code easily shareable and installable by others.

Core Features & Use Cases

  • Package Structure: Guides you through recommended project layouts (src layout, flat layout).
  • Configuration: Demonstrates how to use pyproject.toml for modern packaging standards (PEP 517, 621).
  • Building & Publishing: Covers local builds, publishing to PyPI/TestPyPI, and automated workflows.
  • Use Case: You've developed a useful Python library and want to share it with the community via PyPI. This Skill will guide you through setting up your project, building distributable files, and publishing them.

Quick Start

Use the python-packaging skill to create a minimal pyproject.toml file for a new Python package named 'my-package'.

Frequently Asked Questions about python-packaging

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Python package using pyproject.toml?

To create a Python package using pyproject.toml, configure your project metadata and build backend according to PEP 517 and PEP 621 standards. This Skill provides comprehensive guidance on structuring your project and defining settings for setuptools to build distributable files.

What is the best way to publish a Python package to PyPI?

The best way to publish a Python package to PyPI involves building your distributable files locally and uploading them through standard publishing workflows. This Skill covers local builds, publishing to PyPI or TestPyPI, and setting up automated distribution workflows.

How does setuptools work with modern Python packaging standards?

Setuptools works with modern Python packaging by acting as a build backend configured through pyproject.toml. This Skill demonstrates how to leverage setuptools for managing package layouts, building distributions, and including data files or C extensions in your project.

Can I include C extensions and data files when building Python packages?

Yes, you can include C extensions and data files when building Python packages. This Skill provides comprehensive guidance on managing package layouts, data file inclusion, and compiling C extensions within your pyproject.toml configuration.

What are the recommended project layouts for Python distribution?

The recommended project layouts for Python distribution are the src layout and the flat layout. This Skill guides you through structuring your project using these layouts to ensure your code is easily shareable and installable by others.

Why do I need pyproject.toml for my Python library?

You need pyproject.toml for your Python library to define project metadata, dependencies, and build backends according to modern packaging standards like PEP 517 and PEP 621. This configuration replaces older methods, streamlining the creation and distribution process.