1
0
mirror of https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git synced 2026-10-24 00:48:53 +03:00
Commit Graph

8 Commits

Author SHA1 Message Date
Vincent Fazio
c0650edd44 bindings: python: add a changelog
Add a changelog to summarize changes to the bindings between releases.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Link: https://patch.msgid.link/20260527215922.18678-4-vfazio@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-05-28 11:01:02 +02:00
Bartosz Golaszewski
aa5a1e92b1 bindings: python: tests: rename procname to system
We'll be extending the functionality of that C extension with other
OS-level helpers so change its name to 'system'.

Reviewed-by: Vincent Fazio <vfazio@xes-inc.com>
Link: https://lore.kernel.org/r/20241120-drop-distutils-v1-2-7498e8b3babe@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-11-25 10:03:50 +01:00
Bartosz Golaszewski
ab8662e50e bindings: python: add build_tests.py to the manifest
build_tests.py is not part of the sdist so tests cannot be built from
pypi releases. Add it to MANIFEST.in.

Fixes: d588a6a592 ("bindings: python: standalone build tooling for tests")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-11-09 21:22:07 +01:00
Phil Howard
0e81b62c01 bindings: python: optionally include module in sdist
Optionally vendor libgpiod source into sdist so that the Python module can
be built from source, even with a missing or mismatched system libgpiod.

Add two new environment variables "LINK_SYSTEM_LIBGPIOD" and
"LIBGPIOD_VERSION" to control what kind of package setup.py will build.

In order to build an sdist or wheel package with a vendored libgpiod a
version must be specified via the "LIBGPIOD_VERSION" environment variable.

This will instruct setup.py to verify the given version against the list
in sha256sums.asc and ensure it meets or exceeds a LIBGPIOD_MINIMUM_VERSION
required for compatibility with the bindings.

It will then fetch the tarball matching the requested version from
mirrors.edge.kernel.org, verify the sha256 signature, unpack it, and copy
the lib and include directories into the package root so they can be
included in sdist or used to build a binary wheel.

eg: LIBGPIOD_VERSION=2.1.0 python3 setup.py sdist

Will build a source distribution with gpiod version 2.1.0 source included.

It will also save the gpiod version into "libgpiod-version.txt" so that it
can be passed to the build when the sdist is built by pip.

Requiring an explicit version ensures that the Python bindings - which
can be changed and versions independent of libgpiod - are built against a
stable libgpiod release.

In order to force a package with vendored gpiod source to link the system
libgpiod, the "LINK_SYSTEM_LIBGPIOD" environment variable can be used:

eg: LINK_SYSTEM_LIBGPIOD=1 pip install libgpiod

Signed-off-by: Phil Howard <phil@gadgetoid.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-11-03 11:36:28 +01:00
Phil Howard
389a966d4e bindings: python: move long_description into README.md
Move the long_description into README.md and include some basic
information about libgpiod, and some simple Python example code.

Signed-off-by: Phil Howard <phil@gadgetoid.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-10-24 11:06:12 +02:00
Bartosz Golaszewski
ff1245f351 bindings: python: add missing test package files to the manifest
__main__.py and __init__.py are omitted with the default source discovery
so add an explicit recursive include for tests in order to package them.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-04-12 22:34:16 +02:00
Bartosz Golaszewski
8501988c9d bindings: python: add test extension sources to the manifest
We want to package the .c sources for test-specific extensions so add
them to the manifest.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-04-12 21:52:42 +02:00
Bartosz Golaszewski
f1bb51a5ab bindings: python: add MANIFEST.in
In order to allow building sdist and wheel packages for python bindings
with python3-build, add a proper MANIFEST.in file.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2023-04-12 17:19:52 +02:00