Skip to contentSkip to conversation

bindings: python: add py.typed marker

PATCH Applied Vincent Fazio 2 participants 2 messages Sep 14, 2024 – Sep 16, 2024 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bindings: python: add py.typed marker

Per PEP 561 [0], the marker is used by type checkers like mypy to recognize that the library is typed.

[0]: https://peps.python.org/pep-0561/#packaging-type-information

---
 bindings/python/gpiod/py.typed | 0
 bindings/python/setup.py       | 1 +
 2 files changed, 1 insertion(+)
 create mode 100644 bindings/python/gpiod/py.typed
bindings/python/gpiod/py.typed new file +0 -0
new file mode 100644
index 0000000..e69de29
bindings/python/setup.py +1 -0
index 9607a28..1f04b99 100644
@@ -224,6 +224,7 @@ setup(
     name="gpiod",
     url="https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git",
     packages=find_packages(exclude=["tests", "tests.*"]),
+    package_data={"gpiod": ["py.typed"]},
     python_requires=">=3.9.0",
     ext_modules=[gpiod_ext],
     cmdclass={"build_ext": build_ext, "sdist": sdist},
Signature · 1 line
2.34.1