# SPDX-License-Identifier: GPL-2.0-or-later # SPDX-FileCopyrightText: 2023 Phil Howard [build-system] requires = ["setuptools>=69.0.0", "wheel", "packaging"] build-backend = "setuptools.build_meta" [project] name = "gpiod" dynamic = ["version"] description = "Python bindings for libgpiod" readme = "README.md" license = "LGPL-2.1-or-later" requires-python = ">=3.9.0" authors = [ {name = "Bartosz Golaszewski", email = "brgl@bgdev.pl"}, ] classifiers = [ "Development Status :: 5 - Production/Stable", "Operating System :: POSIX :: Linux", "Typing :: Typed", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", ] [project.urls] Homepage = "https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git" Issues = "https://github.com/brgl/libgpiod/issues/" [tool.setuptools] platforms = ["linux"] include-package-data = false [tool.setuptools.dynamic] version = {attr = "gpiod.version.__version__"} [tool.setuptools.packages.find] include = ["gpiod"] namespaces = false [tool.mypy] python_version = "3.9" files = [ "gpiod/", "tests/", ] [[tool.mypy.overrides]] module = "gpiod.line.*" strict_equality = false # Ignore Enum comparison-overlap: https://github.com/python/mypy/issues/17317 [tool.ruff] target-version = "py39" include = [ "gpiod/**/*.py", "gpiod/**/*.pyi", "tests/**/*.py", "tests/**/*.pyi", ] [tool.ruff.lint] select = ["B", "E", "F", "I", "TCH", "UP"] ignore=[ # Ignore chained exception warnings for now: https://docs.astral.sh/ruff/rules/raise-without-from-inside-except/ "B904", # Never enforce line length violations. Let the formatter handle it: https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules "E501", # Ignore new Union (|) syntax until we require 3.10+ "UP007", "UP045", ] [tool.ruff.lint.per-file-ignores] "gpiod/__init__.py" = ["F403", "F405"] # ignore warnings about star imports "tests/__main__.py" = ["F403"] "tests/**.py" = ["F841"] # ignore warnings about unused variables [tool.cibuildwheel] build = "cp*" skip = "cp31?t-*" # Do not build free-threaded wheels archs = ["x86_64", "aarch64"]