[libgpiod][PATCH] bindings: python: add py.typed marker

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 bindings/python/gpiod/py.typed | 0
 bindings/python/setup.py       | 1 +
 2 files changed, 1 insertion(+)
 create mode 100644 bindings/python/gpiod/py.typed

diff --git a/bindings/python/gpiod/py.typed b/bindings/python/gpiod/py.typed
new file mode 100644
index 0000000..e69de29
diff --git a/bindings/python/setup.py b/bindings/python/setup.py
index 9607a28..1f04b99 100644
--- a/bindings/python/setup.py
+++ b/bindings/python/setup.py
@@ -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},
-- 
2.34.1





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux