The Meson Build System http://mesonbuild.com
  • Python 80.4%
  • Meson 11.9%
  • C 3.6%
  • Shell 1%
  • C++ 1%
  • Other 1.7%
Find a file
2026-11-30 22:56:36 +02:00
.github ci: make one of the clang jobs use MESON_RSP_THRESHOLD=0 2026-10-30 19:30:07 +01:00
ci ciimage: gentoo: skip 32-bit multilibs + dump debug info 2026-11-24 20:24:02 +01:00
cross add missing release notes for 1.13 2026-10-28 15:35:07 +01:00
data interpreter: Add a default() function 2026-07-04 19:04:10 +02:00
docs sdcc: pass --debug to the link and declare the .cdb 2026-11-30 10:37:01 +01:00
graphics Document the color used in the logo. 2023-10-06 13:09:53 +03:00
man Bump version number for 1.13 rc1. 2026-11-24 00:40:36 +02:00
manual tests interpreter: Handle BuildTarget.vala_args as Files in the interpreter 2023-10-09 17:33:48 -04:00
mesonbuild Bump version number for rc2. 2026-11-30 22:56:36 +02:00
packaging ruff: Fix automatically fixable PyFlakes issues 2026-10-24 08:13:14 +02:00
test cases Renumber test dirs for rc2. 2026-11-30 21:38:41 +02:00
tools ruff: Fix automatically fixable PyFlakes issues 2026-10-24 08:13:14 +02:00
unittests Renumber test dirs for rc2. 2026-11-30 21:38:41 +02:00
.editorconfig editorconfig settings: attempt to guarantee the final end-of-line char 2021-09-20 17:54:19 -04:00
.flake8 modules/cuda: completely revamp microarchitecture handling 2026-08-11 16:53:14 +01:00
.gitattributes Mark the bash completion files for bash and zsh as Shell files 2024-02-09 22:26:46 +05:30
.gitignore wrap: Lock subproject directory when downloading wraps 2025-06-03 15:43:58 +03:00
.mailmap Update email address in .mailmap. 2025-05-20 11:40:15 -04:00
.mypy.ini build: express that BothLibraries can appear in link_whole and link_with arguments 2026-09-21 23:21:12 +02:00
.pylintrc pickle: proxy the environment when saving CoreData, replace it on load 2026-11-14 12:02:54 +01:00
.ruff.toml ruff: Enable PERF by default, disable PERF203 for now 2026-10-30 20:04:49 -07:00
AGENTS.md AGENTS.md: Add based on GStreamer 2026-09-01 14:19:33 -07:00
azure-pipelines.yml ci/windows: Use Python 3.10 2026-04-23 14:01:23 -07:00
CLAUDE.md AGENTS.md: Add based on GStreamer 2026-09-01 14:19:33 -07:00
CODEOWNERS modules/wayland: Add unstable_wayland module 2022-02-27 14:33:33 -05:00
contributing.md Readme fixes. [skip ci] 2019-06-06 21:54:50 +03:00
COPYING Start of project. 2012-12-23 16:35:35 +02:00
GEMINI.md AGENTS.md: Add based on GStreamer 2026-09-01 14:19:33 -07:00
MANIFEST.in remove outdated reference to deleted files in setuptools packaging 2022-02-16 18:19:13 -05:00
meson.py Drop Python < 3.10 support 2026-04-23 14:01:23 -07:00
pyproject.toml Do not require wheel for building 2026-01-05 17:56:07 -05:00
README.md Drop Python < 3.10 support 2026-04-23 14:01:23 -07:00
run_cross_test.py Use SPDX-License-Identifier consistently 2023-12-13 15:19:21 -05:00
run_format_tests.py Add more explicit documentation on symlinks in test data. 2026-11-23 22:11:21 +02:00
run_meson_command_tests.py ruff: Fix automatically fixable PyFlakes issues 2026-10-24 08:13:14 +02:00
run_mypy.py run_mypy: refactor check_mypy so that the import is used 2026-10-24 08:13:14 +02:00
run_project_tests.py ruff: Enable PERF402 2026-10-30 20:04:49 -07:00
run_shell_checks.py ci: Drop ubuntu bionic 2026-04-23 14:01:23 -07:00
run_single_test.py run_project_tests: Plumb test category name down into TestDef 2026-03-16 18:38:22 +01:00
run_tests.py run_tests: clean the CMakeExecutor cache as well 2026-11-19 20:03:42 +01:00
run_unittests.py Split only at first equal sign more often 2026-03-04 12:54:20 +01:00
setup.cfg Drop Python < 3.10 support 2026-04-23 14:01:23 -07:00
setup.py Ignore ruff F401 warnings for imports that are being used for existance checks 2026-10-24 08:13:14 +02:00
skip_ci.py Use SPDX-License-Identifier consistently 2023-12-13 15:19:21 -05:00

Meson® is a project to create the best possible next-generation build system.

Status

PyPI Build Status Codecov

Dependencies

  • Python (version 3.10 or newer)
  • Ninja (version 1.8.2 or newer)

Latest Meson version supporting previous Python versions:

  • Python 3.9: 1.11
  • Python 3.8: 1.11
  • Python 3.7: 1.11
  • Python 3.6: 0.61.5
  • Python 3.5: 0.56.2
  • Python 3.4: 0.45.1

Installing from source

Meson is available on PyPI, so it can be installed with pip3 install meson. The exact command to type to install with pip can vary between systems, be sure to use the Python 3 version of pip.

If you wish you can install it locally with the standard Python command:

python3 -m pip install meson

For builds using Ninja, Ninja can be downloaded directly from Ninja GitHub release page or via PyPI

python3 -m pip install ninja

More on Installing Meson build can be found at the getting meson page.

Creating a standalone script

Meson can be run as a Python zip app. To generate the executable run the following command:

./packaging/create_zipapp.py --outfile meson.pyz --interpreter '/usr/bin/env python3' <source checkout>

Running

Meson requires that you have a source directory and a build directory and that these two are different. In your source root must exist a file called meson.build. To generate the build system run this command:

meson setup <source directory> <build directory>

Depending on how you obtained Meson the command might also be called meson.py instead of plain meson. In the rest of this document we are going to use the latter form.

You can omit either of the two directories, and Meson will substitute the current directory and autodetect what you mean. This allows you to do things like this:

cd <source root>
meson setup builddir

To compile, cd into your build directory and type ninja. To run unit tests, type ninja test.

More on running Meson build system commands can be found at the running meson page or by typing meson --help.

Contributing

We love code contributions. See the contribution page on the website for details.

IRC

The channel to use is #mesonbuild either via Matrix (web interface) or OFTC IRC.

Further info

More information about the Meson build system can be found at the project's home page.

Meson is a registered trademark of Jussi Pakkanen.