mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 01:57:43 +00:00
Adds python3 setuptools as a build dependency for libapparmor Fixes: https://gitlab.com/apparmor/apparmor/-/issues/202 MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/813 Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com> Acked-by: Christian Boltz <apparmor@cboltz.de>
22 lines
703 B
Makefile
22 lines
703 B
Makefile
if HAVE_PYTHON
|
|
|
|
# NOTE: tests needs to exist in test/test*.py for python's setuptools
|
|
# not to treat it as a script to install.
|
|
|
|
test_python.py: test_python.py.in $(top_builddir)/config.status
|
|
$(AM_V_GEN)cd "$(top_builddir)" && \
|
|
$(SHELL) ./config.status --file="swig/python/test/$@"
|
|
chmod +x test_python.py
|
|
|
|
CLEANFILES = test_python.py
|
|
|
|
# bah, how brittle is this?
|
|
PYTHON_DIST_BUILD_PATH = '$(builddir)/../build/$$($(PYTHON) -c "import sysconfig; print(\"lib.%s-%s\" %(sysconfig.get_platform(), sysconfig.get_python_version()))")'
|
|
|
|
TESTS = test_python.py
|
|
TESTS_ENVIRONMENT = \
|
|
LD_LIBRARY_PATH='$(top_builddir)/src/.libs:$(PYTHON_DIST_BUILD_PATH)' \
|
|
PYTHONPATH='$(PYTHON_DIST_BUILD_PATH)'
|
|
|
|
endif
|