Debian Codegraph @

bindings/python/Makefile.am

raw
1 # SPDX-License-Identifier: GPL-2.0-or-later
2 # SPDX-FileCopyrightText: 2022 Bartosz Golaszewski <[email protected]>
3
4 EXTRA_DIST = \
5 MANIFEST.in \
6 README.md \
7 build_tests.py \
8 generate_pypi_artifacts.sh \
9 pyproject.toml \
10 setup.py
11
12 if WITH_TESTS
13
14 python-tests:
15 TOP_SRCDIR=$(abs_top_builddir) \
16 TOP_BUILDDIR=$(abs_top_builddir) \
17 $(PYTHON) build_tests.py
18
19 python-tests-run:
20 PYTHONPATH=$(abs_top_srcdir)/bindings/python \
21 LD_LIBRARY_PATH=$(abs_top_builddir)/lib/.libs/:\
22 $(abs_top_builddir)/tests/gpiosim/.libs/ \
23 $(PYTHON) -B -m tests
24
25 else
26
27 python-tests:
28
29 endif
30
31 clean-local:
32 rm -rf dist
33 rm -f gpiod/_ext.*.so
34 rm -f tests/*/_ext.*.so
35
36 all-local: python-tests
37 CFLAGS="-I$(abs_top_srcdir)/include/ -I$(abs_top_srcdir)/tests/gpiosim \
38 -L$(abs_top_builddir)/lib/.libs/ -L$(abs_top_builddir)/tests/gpiosim/.libs/" \
39 $(PYTHON) -m build
40
41 install-exec-local:
42 $(PYTHON) -m pip install dist/*.whl \
43 --ignore-installed --prefix=$(prefix) --root=$(if $(DESTDIR),$(DESTDIR),/)
44
45 SUBDIRS = gpiod
46
47 if WITH_TESTS
48
49 SUBDIRS += tests
50
51 endif
52
53 if WITH_EXAMPLES
54
55 SUBDIRS += examples
56
57 endif