bindings: python: add py.typed marker
authorVincent Fazio <vfazio@gmail.com>
Sat, 14 Sep 2024 18:33:02 +0000 (13:33 -0500)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 16 Sep 2024 06:42:42 +0000 (08:42 +0200)
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

Closes: https://github.com/brgl/libgpiod/issues/94
Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Link: https://lore.kernel.org/r/20240914183302.15768-1-vfazio@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
bindings/python/gpiod/py.typed [new file with mode: 0644]
bindings/python/setup.py

diff --git a/bindings/python/gpiod/py.typed b/bindings/python/gpiod/py.typed
new file mode 100644 (file)
index 0000000..e69de29
index 9607a2831a161378c3851b6cf7af12f164d869c7..1f04b9939b47dc7b960679b6f24e87a6f2a4e46f 100644 (file)
@@ -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},