{"library":"meson-python","code":"mkdir my_project\ncd my_project\n\n# Create pyproject.toml\ncat <<EOL > pyproject.toml\n[build-system]\nrequires = [\"meson-python\", \"meson\", \"ninja\"]\nbuild-backend = \"mesonpy\"\n\n[project]\nname = \"my_example_package\"\nversion = \"0.1.0\"\nEOL\n\n# Create meson.build\ncat <<EOL > meson.build\nproject('my_example_package', 'python', version: '0.1.0')\npython = import('python').find_installation(pure: false)\npython.install_sources(\n    'src/my_example_package/__init__.py',\n    subdir: 'my_example_package'\n)\nEOL\n\n# Create a simple Python source file\nmkdir -p src/my_example_package\ncat <<EOL > src/my_example_package/__init__.py\ndef greet():\n    return \"Hello from my_example_package!\"\nEOL\n\n# Build the package (e.g., a wheel)\npython -m build --wheel\n\n# Install and test (optional)\npip install dist/*.whl\npython -c \"from my_example_package import greet; print(greet())\"\n","lang":"bash","description":"This quickstart demonstrates how to set up a minimal Python project using `meson-python` as the build backend. It involves creating a `pyproject.toml` to declare `mesonpy` as the backend and a `meson.build` file to define the build logic. The example then shows how to build a wheel distribution and optionally install and test it.","tag":null,"tag_description":null,"last_tested":"2026-04-24","results":[{"runtime":"python:3.10-alpine","exit_code":1},{"runtime":"python:3.10-slim","exit_code":1},{"runtime":"python:3.11-alpine","exit_code":1},{"runtime":"python:3.11-slim","exit_code":1},{"runtime":"python:3.12-alpine","exit_code":1},{"runtime":"python:3.12-slim","exit_code":1},{"runtime":"python:3.13-alpine","exit_code":1},{"runtime":"python:3.13-slim","exit_code":1},{"runtime":"python:3.9-alpine","exit_code":1},{"runtime":"python:3.9-slim","exit_code":1}]}