setup-to-pyproject

Migrate Python packaging from setup.py and setup.cfg to pyproject.toml.

43|5|Updated Dec 29, 2025
One-click install
npx skills add https://github.com/simonw/skills --skill setup-to-pyproject
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: setup-to-pyproject
Source: https://github.com/simonw/skills/tree/main/setup-to-pyproject
Command: npx skills add https://github.com/simonw/skills --skill setup-to-pyproject

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps Python developers migrate their projects from older packaging standards like setup.py and setup.cfg to the modern pyproject.toml format, ensuring compatibility with tools like uv.

Core Features & Use Cases

  • Modernization: Converts legacy Python packaging configurations to pyproject.toml.
  • uv Compatibility: Sets up projects to work seamlessly with the uv package manager, including dependency groups for development tools like pytest.
  • Use Case: You have an established Python project using setup.py and want to adopt uv for faster dependency management and building. This skill guides you through the conversion process.

Quick Start

Migrate the current Python project's packaging from setup.py to pyproject.toml.

Frequently Asked Questions about setup-to-pyproject

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

FAQPage Schema
How do I migrate a Python project from setup.py to pyproject.toml?

Migrating from setup.py to pyproject.toml involves converting legacy build configurations into the modern format, ensuring standardized build setups and compatibility with the uv package manager for streamlined building.

What is the best way to configure Python packaging for uv compatibility?

Configuring Python packaging for uv requires a pyproject.toml file that defines standardized build configurations and uses dependency groups for development tools like pytest, allowing uv build and uv run to function correctly.

Why does uv run pytest fail with my legacy setup.py configuration?

uv run pytest fails with legacy setup.py because uv relies on modern pyproject.toml standards for dependency group management and project building, which setup.py does not natively support.

Do I need pyproject.toml to use uv for package building?

Yes, you need pyproject.toml to use uv for package building, as uv requires modern standardized build configurations to manage dependencies and execute builds correctly rather than relying on legacy setup.py files.

How do I manage development dependencies like pytest when migrating to pyproject.toml?

When migrating to pyproject.toml, you manage development dependencies by defining them within specific dependency groups, allowing package managers like uv to correctly run testing and development tools.