[libgpiod][PATCH 2/9] bindings: python: build_tests: simplify the Distribution

Vincent Fazio
2026-04-01T00:18:06Z

The version, package, and platform information is not necessary to
compile and stage the extensions, so drop that information.

If we need to add it back, we can use `dist.parse_config_files()` to
parse information from the pyproject.toml.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
---
bindings/python/build_tests.py | 6 ------
1 file changed, 6 deletions(-)

diff --git a/bindings/python/build_tests.py b/bindings/python/build_tests.py
index 6375b29..77e38ba 100644
--- a/bindings/python/build_tests.py
+++ b/bindings/python/build_tests.py
@@ -27,9 +27,6 @@ logging.configure()
TOP_SRCDIR = getenv("TOP_SRCDIR", "../../")
TOP_BUILDDIR = getenv("TOP_BUILDDIR", "../../")

-# __version__
-with open("gpiod/version.py", "r") as fd:
- exec(fd.read())

# The tests are run in-place with PYTHONPATH set to bindings/python
# so we need the gpiod extension module too.
@@ -72,10 +69,7 @@ system_ext = Extension(

dist = Distribution(
{
- "name": "gpiod",
"ext_modules": [gpiosim_ext, system_ext, gpiod_ext],
- "version": __version__,
- "platforms": ["linux"],
}
)

--
2.43.0