Skip to content
Researched developer tool comparisonsPrices dated · vendor sources linked · no star ratings
Search

Stage 01 · Write · Researched comparison

Best Python Build Backends for pyproject.toml in 2026

Hatchling is a good default for most pure-Python projects that want a modern backend with a small config surface. setuptools remains the safest pick for legacy layouts and broad plugin support. Choose maturin if you ship Rust extensions, or scikit-build-core or meson-python if your package wraps C or C++ code built with CMake or Meson.

By
Published 28 Nov 2026 · 8 tools compared

We run no ads and no affiliate links at launch. The order of a list follows our published method. See how we score.

Prices are the starting prices vendors list publicly. Plans change, so confirm the current price on the vendor page before you buy.

Key takeaways

  • All eight backends listed here are free and open source, so cost is not the deciding factor.
  • The backend is declared under `[build-system]` in pyproject.toml, and switching is usually a small edit.
  • Pure-Python projects rarely need anything beyond Hatchling, setuptools, Flit or PDM backend.
  • Compiled extensions push you toward maturin, scikit-build-core or meson-python.

Who each pick is for

  • Pure-Python projects that want a modern, low-config backendHatchling
  • Legacy layouts, complex builds and maximum compatibilitysetuptools
  • Small, simple pure-Python packages with minimal configFlit
  • Projects using PDM that want a standalone PEP 517 backendPDM backend
  • Projects already managed by PoetryPoetry core
  • Python packages with Rust extensions built with PyO3maturin
  • C and C++ extensions built with CMakescikit-build-core
  • C and C++ extensions built with the Meson build systemmeson-python

Comparison

The 8 tools at a glance
ToolBest forStandout featureListed starting priceFree plan or trial
1HatchlingPure-Python projects that want a modern, low-config backendSmall default configFree (open source)Free plan
2setuptoolsLegacy layouts, complex builds and maximum compatibilityWidest compatibility and plugin supportFree (open source)Free plan
3FlitSmall, simple pure-Python packages with minimal configVery small configFree (open source)Free plan
4PDM backendProjects using PDM that want a standalone PEP 517 backendWorks without PDM installedFree (open source)Free plan
5Poetry coreProjects already managed by PoetryStandalone PEP 517 backendFree (open source)Free plan
6maturinPython packages with Rust extensions built with PyO3Builds and publishes Rust-backed wheelsFree (open source)Free plan
7scikit-build-coreC and C++ extensions built with CMakeCMake-driven builds with pyproject.toml configFree (open source)Free plan
8meson-pythonC and C++ extensions built with the Meson build systemMeson-driven builds with pyproject.toml configFree (open source)Free plan

How we picked

We compared backends on fit for the job (pure-Python versus compiled extensions), supported platforms, licence and price, editable-install support, and the real limits each one documents. Sources are vendor pages, official documentation and project repositories. All listed projects are open source and free to use. Prices and features change, so confirm details on each project's site before you commit.

The tools, one by one

01

Hatchling

Best for pure-Python projects that want a modern, low-config backend

Visit github.com
Hatchling homepage
Hatchling homepage, captured Nov 2026

What it is and where it fits

Hatchling is the build backend that ships with Hatch. It reads `[build-system]` and `[tool.hatch]` tables in pyproject.toml and builds wheels and sdists without a setup.py. Defaults follow common layouts, so a simple package often needs only the backend declaration and a project name. It supports versioning from files, environment variables and VCS tags through plugins.

It runs on any platform with a supported Python interpreter, since it is pure Python. The licence is MIT. Editable installs work through PEP 660. The main limit is that projects relying on setuptools-specific behaviour, such as certain custom commands or legacy namespace packages, may need extra work. Skip Hatchling if you depend heavily on setuptools entry points and command hooks you do not want to rewrite.

Standout: Small default config

Pricing pointer

Free (open source), as listed by the vendor (Hatchling website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Small default config
  • supports src layout, plugins and version from VCS
  • good editable installs

Drawbacks

  • Fewer legacy hooks than setuptools
  • plugin ecosystem is smaller

Skip it if this limit matters to you: fewer legacy hooks than setuptools.

Verdict. A sensible pick for pure-Python projects that want a modern, low-config backend.

Alternatives in this guide: setuptools, Flit, PDM backend

02

setuptools

Best for legacy layouts, complex builds and maximum compatibility

Visit github.com
setuptools homepage
setuptools homepage, captured Nov 2026

What it is and where it fits

setuptools is the long-standing default backend. It supports pyproject.toml through `[tool.setuptools]` and still reads setup.py and setup.cfg for projects that have not migrated. It handles package data, entry points, namespace packages, C extensions through its build_ext command, and a large set of third-party plugins.

It runs on all major platforms. The licence is MIT. Because it carries years of backward compatibility, configuration can be verbose, and some defaults differ from newer backends. For new pure-Python projects it is often more than you need. Keep it when you have existing setup.py logic, unusual build steps, or dependencies that expect setuptools behaviour.

Standout: Widest compatibility and plugin support

Pricing pointer

Free (open source), as listed by the vendor (setuptools website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Widest compatibility and plugin support
  • handles most legacy layouts and custom commands

Drawbacks

  • More configuration surface
  • older patterns can be hard to migrate

Skip it if this limit matters to you: more configuration surface.

Verdict. A sensible pick for legacy layouts, complex builds and maximum compatibility.

Alternatives in this guide: Hatchling, Flit, PDM backend

03

Flit

Best for small, simple pure-Python packages with minimal config

Visit github.com
Flit homepage
Flit homepage, captured Nov 2026

What it is and where it fits

Flit is a build backend and publishing tool aimed at simple pure-Python projects. It reads metadata from pyproject.toml and expects a straightforward layout, either a single module or one package. It builds wheels and sdists and can upload to PyPI through its command line.

It is pure Python and runs on any platform with a supported interpreter. The licence is BSD. Flit deliberately avoids setup.py and complex build hooks, which keeps config short but limits flexibility. It does not target compiled extensions. Skip Flit if you need custom build steps, multiple top-level packages, or dynamic metadata beyond what it supports.

Standout: Very small config

Pricing pointer

Free (open source), as listed by the vendor (Flit website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Very small config
  • clear defaults for single-module and package layouts
  • simple publishing flow

Drawbacks

  • Limited to pure-Python use cases
  • fewer extension hooks than larger backends

Skip it if this limit matters to you: limited to pure-Python use cases.

Verdict. A sensible pick for small, simple pure-Python packages with minimal config.

Alternatives in this guide: Hatchling, setuptools, PDM backend

04

PDM backend

Best for projects using PDM that want a standalone PEP 517 backend

Visit github.com
PDM backend homepage
PDM backend homepage, captured Nov 2026

What it is and where it fits

pdm-backend is the PEP 517 build backend used by the PDM package manager, but it can be used on its own. It reads `[tool.pdm.build]` in pyproject.toml and builds wheels and sdists. It supports dynamic version sources, including reading from files or SCM, and PEP 660 editable installs.

It is pure Python and runs on any platform with a supported interpreter. The licence is MIT. Because it is maintained alongside PDM, documentation often assumes PDM workflows, which can be a small hurdle if you use a different tool. It is a reasonable choice for pure-Python projects that want a modern backend without setuptools. Projects with heavy C extension builds should look at the compiled-extension options below.

Standout: Works without PDM installed

Pricing pointer

Free (open source), as listed by the vendor (PDM backend website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Works without PDM installed
  • supports dynamic version and editable installs
  • handles pure-Python and some extension cases

Drawbacks

  • Smaller community than setuptools
  • some features are tied to PDM conventions

Skip it if this limit matters to you: smaller community than setuptools.

Verdict. A sensible pick for projects using PDM that want a standalone PEP 517 backend.

Alternatives in this guide: Hatchling, setuptools, Flit

05

Poetry core

Best for projects already managed by Poetry

Visit github.com
Poetry core homepage
Poetry core homepage, captured Nov 2026

What it is and where it fits

poetry-core is the build backend extracted from Poetry. It can build wheels and sdists as a standalone PEP 517 backend, so you do not need Poetry installed to build a package that declares it. Metadata comes from the `[tool.poetry]` table in pyproject.toml.

It is pure Python and runs on any platform with a supported interpreter. The licence is MIT. The main consideration is consistency: if your project already uses Poetry for dependency management, poetry-core keeps metadata in one place. If you use another tool, its table layout and conventions add a second config style to learn. It targets pure-Python packaging and is not aimed at compiled extensions.

Standout: Standalone PEP 517 backend

Pricing pointer

Free (open source), as listed by the vendor (Poetry core website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Standalone PEP 517 backend
  • consistent with Poetry metadata
  • supports dynamic versioning

Drawbacks

  • Config conventions differ from other backends
  • less useful if you do not use Poetry

Skip it if this limit matters to you: config conventions differ from other backends.

Verdict. A sensible pick for projects already managed by Poetry.

Alternatives in this guide: Hatchling, setuptools, Flit

06

maturin

Best for python packages with Rust extensions built with PyO3

Visit github.com
maturin homepage
maturin homepage, captured Nov 2026

What it is and where it fits

maturin is a build backend and command-line tool for Python packages that contain Rust code, typically through PyO3. It builds wheels and sdists, manages cross-compilation targets, and can publish to PyPI. It declares itself as the backend in `[build-system]` and reads metadata from pyproject.toml and Cargo.toml.

It runs on Linux, macOS and Windows and requires a Rust toolchain at build time. The licence is MIT or Apache-2.0. It also supports mixed projects with both Rust and Python code. The main limit is scope: it is built for Rust extensions, so pure-Python projects gain nothing from it. If your extension code is C or C++, use scikit-build-core or meson-python instead.

Standout: Builds and publishes Rust-backed wheels

Pricing pointer

Free (open source), as listed by the vendor (maturin website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Builds and publishes Rust-backed wheels
  • handles manylinux, macOS and Windows targets
  • integrates with PyO3

Drawbacks

  • Requires a Rust toolchain
  • not intended for pure-Python packages

Skip it if this limit matters to you: requires a Rust toolchain.

Verdict. A sensible pick for python packages with Rust extensions built with PyO3.

Alternatives in this guide: Hatchling, setuptools, Flit

07

scikit-build-core

Best for c and C++ extensions built with CMake

Visit github.com
scikit-build-core homepage
scikit-build-core homepage, captured Nov 2026

What it is and where it fits

scikit-build-core is a PEP 517 build backend that drives CMake to build C and C++ extensions. It reads `[tool.scikit-build]` in pyproject.toml, generates wheels and sdists, and supports PEP 660 editable installs. It is the successor to the original scikit-build.

It runs on Linux, macOS and Windows and requires CMake and a C/C++ compiler at build time. The licence is Apache-2.0. It works with projects that already have CMakeLists.txt, including those wrapping libraries like pybind11 or nanobind. The trade-off is complexity: you maintain CMake files alongside Python packaging config. Pure-Python projects should not use it.

Standout: CMake-driven builds with pyproject.toml config

Pricing pointer

Free (open source), as listed by the vendor (scikit-build-core website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • CMake-driven builds with pyproject.toml config
  • supports editable installs and cross-compilation
  • works with many build systems

Drawbacks

  • Requires CMake knowledge
  • config is more involved than pure-Python backends

Skip it if this limit matters to you: requires CMake knowledge.

Verdict. A sensible pick for C and C++ extensions built with CMake.

Alternatives in this guide: Hatchling, setuptools, Flit

08

meson-python

Best for c and C++ extensions built with the Meson build system

Visit github.com
meson-python homepage
meson-python homepage, captured Nov 2026

What it is and where it fits

meson-python is a PEP 517 build backend that uses Meson to build Python packages with compiled extensions. It reads `[tool.meson-python]` in pyproject.toml and builds wheels and sdists, with support for editable installs. It is used by projects that already rely on Meson for their native build.

It runs on Linux, macOS and Windows and requires Meson and a compiler at build time. The licence is MIT. It is a good fit if your C or C++ code already has a Meson build definition. The main limit is that it assumes Meson knowledge and a Meson build file. If your project uses CMake, scikit-build-core is the closer match.

Standout: Meson-driven builds with pyproject.toml config

Pricing pointer

Free (open source), as listed by the vendor (meson-python website). Confirm the current plan price before you buy.

Free plan. Plans change, so confirm on the vendor's pricing page before you buy.

Benefits

  • Meson-driven builds with pyproject.toml config
  • supports editable installs
  • used by several scientific packages

Drawbacks

  • Requires Meson knowledge
  • smaller user base than setuptools

Skip it if this limit matters to you: requires Meson knowledge.

Verdict. A sensible pick for C and C++ extensions built with the Meson build system.

Alternatives in this guide: Hatchling, setuptools, Flit

Who should use what

If you maintain a small pure-Python library, Hatchling or Flit keeps config short. If you have an older project with setup.py logic or custom commands, stay on setuptools. If you use Poetry for dependencies, poetry-core keeps metadata in one place, and PDM users can pick pdm-backend. If you ship Rust extensions, use maturin. If your C or C++ code already has CMake or Meson files, choose scikit-build-core or meson-python to match.

Questions to settle before you buy

What to check before you buy

  • Confirm the backend is declared under `[build-system]` with a `build-backend` value and `requires` list.
  • Check that editable installs work with your tools if you rely on `pip install -e`.
  • Verify the backend supports your package layout, including src layout and multiple top-level packages.
  • For compiled extensions, confirm your compiler, CMake or Meson version meets the backend's documented minimum.
  • Test a wheel and sdist build in a clean environment before publishing.

FAQ

What is a Python build backend?

A build backend is the tool that turns your source tree into a wheel and an sdist. It is declared in the `[build-system]` table of pyproject.toml. Frontends like pip call the backend through the PEP 517 interface. The backend handles metadata, file selection and any compiled extension build steps.

Can I switch build backends later?

Yes. In most cases you change the `[build-system]` table and move metadata into the new backend's config section. Pure-Python projects usually migrate in a short session. Projects with custom build steps or compiled extensions need more care, so test wheel and sdist builds before publishing.

Do I need setuptools for a new project?

No. setuptools is the most compatible option, but newer backends like Hatchling, Flit and pdm-backend handle pure-Python packaging without it. Choose setuptools when you depend on legacy layouts, custom commands or plugins that expect it.

Which backend should I use for Rust or C extensions?

Use maturin for Rust extensions built with PyO3. Use scikit-build-core for C or C++ code with CMake, and meson-python for C or C++ code with Meson. These backends handle compiler flags, platform wheels and cross-compilation, which pure-Python backends do not.

Are these build backends free?

Yes. All eight backends listed here are open source and free to use. You pay only in setup time and the toolchain each one requires, such as Rust, CMake or Meson for compiled extensions.

Sources we checked

Method: how we score · editorial policy.

  1. Hatchling (official site)
  2. setuptools (official site)
  3. Flit (official site)
  4. PDM backend (official site)
  5. Poetry core (official site)
  6. maturin (official site)
  7. scikit-build-core (official site)
  8. meson-python (official site)

Change log. First published 28 Nov 2026.