1
0
mirror of https://git.kernel.org/pub/scm/libs/libgpiod/libgpiod.git synced 2026-10-24 00:48:53 +03:00
Files
libgpiod/bindings/python/Makefile.am
Kent Gibson dee10f0807 bindings: python: fix python-tests-run make target
The python-tests-run target is broken as it does not correctly split
lines.  It also calls Python directly rather then through the $PYTHON
variable.

Fix the line splitting and call Python using the $PYTHON variable.

Signed-off-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20240526113234.253859-3-warthog618@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
2024-05-28 11:13:15 +02:00

54 lines
1003 B
Makefile

# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
EXTRA_DIST = \
MANIFEST.in \
setup.py
if WITH_TESTS
python-tests:
TOP_SRCDIR=$(abs_top_builddir) \
TOP_BUILDDIR=$(abs_top_builddir) \
$(PYTHON) build_tests.py
python-tests-run:
PYTHONPATH=$(abs_top_srcdir)/bindings/python \
LD_LIBRARY_PATH=$(abs_top_builddir)/lib/.libs/:\
$(abs_top_builddir)/tests/gpiosim/.libs/ \
$(PYTHON) -B -m tests
else
python-tests:
endif
clean-local:
rm -rf dist
rm -f gpiod/_ext.*.so
rm -f tests/*/_ext.*.so
all-local: python-tests
CFLAGS="-I$(abs_top_srcdir)/include/ -I$(abs_top_srcdir)/tests/gpiosim \
-L$(abs_top_builddir)/lib/.libs/ -L$(abs_top_builddir)/tests/gpiosim/.libs/" \
$(PYTHON) -m build
install-exec-local:
$(PYTHON) -m pip install dist/*.whl \
--ignore-installed --prefix=$(prefix) --root=$(if $(DESTDIR),$(DESTDIR),/)
SUBDIRS = gpiod
if WITH_TESTS
SUBDIRS += tests
endif
if WITH_EXAMPLES
SUBDIRS += examples
endif