mirror of
https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git
synced 2026-10-25 12:39:18 +03:00
PEP 621 [0] designated pyproject.toml as the standard place to store project metadata. Setuptools, the build system used by this project, has support for reading metadata from this location. As such, migrate the majority of the metadata out of `setup.py`. For now, the external modules are left declared in `setup.py` because support within pyproject.toml is still experimental [1]. New metadata has been added/updated, namely: * Add Trove classifiers * Add a link to the issues page * Update license from LGPL-2.1 to LGPL-2.1+ to match SPDX identifier [0]: https://peps.python.org/pep-0621/ [1]: https://setuptools.pypa.io/en/stable/userguide/ext_modules.html#pyproject-toml Closes: https://github.com/brgl/libgpiod/issues/107 Signed-off-by: Vincent Fazio <vfazio@xes-inc.com> Link: https://lore.kernel.org/r/20241122171027.762311-1-vfazio@xes-inc.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
82 lines
2.3 KiB
TOML
82 lines
2.3 KiB
TOML
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# SPDX-FileCopyrightText: 2023 Phil Howard <phil@gadgetoid.com>
|
|
|
|
[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 = {text = "LGPL-2.1-or-later"}
|
|
requires-python = ">=3.9.0"
|
|
authors = [
|
|
{name = "Bartosz Golaszewski", email = "brgl@bgdev.pl"},
|
|
]
|
|
classifiers = [
|
|
"Development Status :: 5 - Production/Stable",
|
|
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
|
|
"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",
|
|
]
|
|
|
|
[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",
|
|
]
|
|
|
|
[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 |