Registry / devops / meson
library1.12.0pypypiunverified

Meson is a high-performance, cross-platform build system designed to be both extremely fast and user-friendly. It supports numerous programming languages (C, C++, Rust, Fortran, Java, Python, etc.) and compilers, using a simple, non-Turing complete domain-specific language (DSL) for defining builds. The project aims for a major release approximately every 3-4 months, with bugfix releases in between.

pip install meson
INSTALL
IMPORT
SIG · MESON
M
meson
devopspythonv1.12.0
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Meson DSL
Meson is primarily used via its command-line interface and build definition files (e.g., meson.build), not typically through direct Python imports for general build orchestration. Python modules within Meson's DSL are imported using the `import()` function (e.g., `python = import('python')`).
Meson build files use their own DSL. While Meson is written in Python, direct programmatic use of the 'meson' Python package as a library is not the primary way to interact with the build system for end-user projects. For Python package integration, `meson-python` is the recommended PEP 517 backend.

This quickstart demonstrates how to create a simple C 'Hello World' project with Meson. It involves defining the project and an executable in `meson.build`, configuring the build directory, compiling the project, running the executable, and finally installing it. Meson enforces out-of-source builds, meaning all build artifacts are placed in a separate build directory (e.g., `builddir`).

mkdir myproject cd myproject echo '#include <stdio.h>\nint main() { printf("Hello from Meson!\n"); return 0; }' > main.c echo "project('hello_meson', 'c')\nexecutable('hello', 'main.c', install: true)" > meson.build meson setup builddir meson compile -C builddir ./builddir/hello meson install -C builddir
meson --version
Debug
Known issues
deprecatedThe `meson.build_root()` and `meson.source_root()` functions are deprecated as they often cause issues in subprojects by pointing to the parent project's root.
fix
Use `meson.current_source_dir()`, `meson.current_build_dir()`, `meson.project_source_root()`, or `meson.project_build_root()` instead, which provide better subproject isolation.
affects: >=0.56.0
deprecatedCoercing string values (e.g., `'false'`) to boolean types in the `option()` function is deprecated and will result in a warning.
fix
Pass explicit boolean values (`true` or `false`) to `option()` for boolean types.
affects: >=1.1.0
breakingUsing a colon (':') in test names is deprecated and will be replaced with an underscore ('_') internally, to avoid conflicts with the `subproject:testname` syntax for running subproject-specific tests.
fix
Rename tests to avoid colons in their names.
affects: >=0.56.0
gotchaThe `meson dist` command will error if the Git repository contains uncommitted changes. This is a stricter behavior to prevent accidental releases of non-committed code.
fix
Commit all changes before running `meson dist`, or explicitly use the `--allow-dirty` command-line option if you intend to create a distribution from a dirty working tree.
affects: >=0.62.0
breakingMeson 1.10.0 introduced a 'platform' naming scheme for libraries, which will eventually become the default, potentially altering library filenames (e.g., on Windows, static libraries might change from `.a` to `.lib`, and import libraries from `.lib` to `.dll.lib`).
fix
Projects relying on specific legacy library naming should be aware of the `namingscheme` option. Consider explicitly setting `namingscheme: 'legacy'` in your `project()` call if you depend on old behavior, or adapt to `platform` naming.
affects: >=1.10.0 (future default change)
gotchaPerformance regression in `pkg-config` dependency lookup in Meson 1.10.0, potentially making `meson setup` significantly slower for projects with many `pkg-config` dependencies due to new linkability checks.
fix
This is an ongoing issue reported in the Meson GitHub repository. No direct fix for users at this time, but awareness is key for debugging slow configure times.
affects: >=1.10.0
gotchaThe test script itself contains a Python SyntaxError and thus failed to execute before any library-specific functionality could be tested or trigger warnings. This is not a warning generated by the Meson library.
fix
Correct the Python SyntaxError in the test script (e.g., 'mkdir myproject' is a shell command, not valid Python code directly in a script).
affects: All (Python SyntaxError)
gotchaThe test script encountered a `SyntaxError` because it attempted to execute a non-Python shell command (`mkdir myproject`) directly as Python code. This is an issue with the test script's syntax or how it's being invoked.
fix
Ensure that test scripts are written with valid Python syntax. If shell commands are intended, they should be invoked using Python's `subprocess` module or by executing the script with the appropriate shell interpreter (e.g., `sh` instead of `python`).
affects: N/A (script/environment issue, not library version specific)
Upgrade
Version history
1.12.0latest on PyPI · released Aug 10, 2026
Audit
Dependencies
pythonrequiredMeson is implemented in Python and requires Python 3.7+ to run. It avoids external Python dependencies beyond the standard library.
ninjaoptionalNinja is the default and recommended backend for Meson, used for the actual compilation.
Agent activity
3 hits · last 30 days
node
2
Resources
meson — pip install meson · libregistry