1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
# SPDX-License-Identifier: GPL-2.0-or-later
# SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <brgl@bgdev.pl>
EXTRA_DIST = \
MANIFEST.in \
README.md \
build_tests.py \
generate_pypi_artifacts.sh \
pyproject.toml \
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
|