meson-python
Meson Python build backend (PEP 517)
What it is and what it does
meson-python is a build backend for Python packages that integrates the Meson build system into the PEP 517 build process. It is designed primarily for package developers who need to compile native extensions in languages like C, C++, Cython, Fortran, Pythran, or Rust. Instead of writing configuration in traditional setup files, you define your configuration in Meson's meson.build files, which meson-python then orchestrates during installation.
The package depends on meson, packaging, pyproject-metadata, and tomli. It is actively maintained, has been in production use since 2021-10-28, and carries no known security vulnerabilities. It is best suited for projects where Meson's build speed and user-friendly configuration are advantages for complex C/C++ or polyglot extension modules.
Use it for:
- Building Python packages with C or C++ extensions using Meson's faster system and cleaner configuration syntax.
- Compiling Cython, Fortran, or Rust extensions as part of a Python package distribution.
- Migrating to Meson for projects where compilation complexity or performance is a concern.
- Packaging scientific libraries that combine Python with compiled numerical code.
- Standardizing configuration across polyglot projects that already use Meson for non-Python components.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
meson-python is a PEP 517 build backend that uses the Meson build system to configure and compile Python packages, particularly those with native extension modules in C, C++, Cython, Fortran, Pythran, or Rust.
Yes, if you are a package developer building Python extensions and want to use Meson. The package is production-stable, actively maintained, has no known vulnerabilities, and low install friction. Not relevant for end users installing pre-built wheels; only needed during development and packaging.
Install
meson-python on PyPI
pip
pip install meson-pythonuv
uv add meson-pythonpoetry
poetry add meson-pythonInstalling meson-python
Before you install
Low install friction with a pure-wheel distribution. The package is actively maintained with a recent release and no known vulnerabilities. Runtime dependencies are minimal and stable: meson, packaging, pyproject-metadata, tomli.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or redistribution. Safe for both open-source and commercial projects.
Quickstart
# In pyproject.toml:
[build-system]
requires = ["meson-python", "meson", "ninja"]
build-backend = "mesonpython.build"
# Then build with:
pip install --no-build-isolation .
Requires Meson and Ninja to be installed on the system; intended for package developers, not end users installing pre-built wheels.
Verify before relying
- Whether Meson and Ninja installation is automatic or requires manual setup on all target platforms.
- Performance characteristics compared to alternative build backends for typical extension modules.
- Maturity of support for less common languages like Pythran and Fortran in practice.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — meson, packaging, pyproject-metadata, tomli |
| Maintenance | actively maintained — 65 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 15,272,549/month — #1,190 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: meson_python-0.20.0-py3-none-any.whl
Keywords: meson, build, backend, pep517, package
Tags
More Build Tools packages
Provides reusable utilities for Python…
permissive · top 100 on PyPI
tqdmWraps any iterable to display a real-time…
copyleft · top 100 on PyPI
pippip is the standard installer for Python…
permissive · top 100 on PyPI
hatchlingHatchling is a standards-compliant Python build…
permissive · top 100 on PyPI
grpcio-toolsGenerates Python gRPC service stubs and message…
permissive · top 1,000 on PyPI
pre-commitpre-commit is a framework for installing and…
permissive · top 1,000 on PyPI
mesonMeson is a build system that reads declarative…
permissive · top 5,000 on PyPI
pep517Provides subprocess-isolated wrappers around…
permissive · top 5,000 on PyPI
PyQt-builderPyQt-builder is a PEP 517 compliant build…
permissive · top 15,000 on PyPI
pdm-backendA PEP 517-compliant build backend that reads…
permissive · top 5,000 on PyPI
poetry-corepoetry-core is a PEP 517 build backend that…
permissive · top 1,000 on PyPI
pdm-pep517A PEP 517 build backend that reads PEP 621…
permissive · top 15,000 on PyPI
wheywhey is a PEP 517 build backend that creates…
permissive · top 15,000 on PyPI
scikit-buildscikit-build bridges setuptools and CMake to…
permissive · top 5,000 on PyPI
pythranPythran is an ahead-of-time compiler that…
unclear · top 5,000 on PyPI
spinspin is a command-line tool that abstracts…
permissive · top 15,000 on PyPI