[project]
name = "pycairo"
version = "1.29.1"
description = "Python interface for cairo"
readme = "README.rst"
requires-python = ">=3.10"
license = {text = "LGPL-2.1-only OR MPL-1.1"}
maintainers = [{name = "Christoph Reiter", email = "reiter.christoph@gmail.com"}]
urls = {Homepage = "https://pycairo.readthedocs.io", Source = "https://github.com/pygobject/pycairo"}
dependencies = []

[tool.poetry]
requires-poetry = '>=2.2'
package-mode = false

[tool.poetry.group.docs]
optional = true

[tool.poetry.group.test-extras]
optional = true

[dependency-groups]
dev = [
    "pytest>=8.3.0,<10",
    "mypy==1.18.2 ; platform_python_implementation != 'PyPy'",
    "flake8>=7.0.0,<8",
    "coverage[toml]>=7.2.3,<8",
    "meson-python>= 0.16.0",
]
docs = [
    "Sphinx>=7.4.0,<8",
    "sphinx-rtd-theme>=3.0.0,<4",
    "sphinx-autobuild>=2024.10.3,<2025",
]
test-extras = [
    "pygame>=2.1.3,<3",
    "numpy>=2.0.0,<3",
]

[tool.uv]
package = false

[tool.coverage.run]
include = [
    "cairo/*",
    "tests/*"
]

[tool.mypy]
disallow_any_unimported = true
disallow_any_expr = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
check_untyped_defs = true
warn_return_any = true
no_implicit_optional = true
disallow_any_decorated = true
disallow_any_explicit = false
strict_optional = true
follow_imports = "silent"
exclude = ["^(examples/|build|docs/)"]

[[tool.mypy.overrides]]
module = "setup"
ignore_errors = true

[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false
disallow_any_expr = false
disallow_any_generics = false
disallow_any_decorated = false
disallow_untyped_calls = false

[tool.meson-python.args]
setup = ["-Dwheel=true", "-Dtests=false"]

[build-system]
build-backend = 'mesonpy'
requires = ['meson-python >= 0.16.0']
