mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 16:35:02 +01:00
utils/test/Makefile: add libapparmor to PYTHONPATH
The last utils/test/Makefile change switched to using the in-tree libapparmor by default (unless USE_SYSTEM=1 is given). However, I missed to add the swig/python parts of libapparmor to PYTHONPATH, so the system-wide LibAppArmor/__init__.py was always used. This patch adds the in-tree libapparmor python module to PYTHONPATH. I'm sorry for the interesting[tm] way to find out that path, but a) I don't know a better / less ugly way and b) a similar monster already works in libapparmor/swig/python/test/ ;-) Acked-by: John Johansen <john.johansen@canonical.com> for 2.9 and trunk (that also implies 2.10 ;-)
This commit is contained in:
parent
e23168bc60
commit
55d325d21b
1 changed files with 3 additions and 1 deletions
|
@ -30,8 +30,10 @@ ifdef USE_SYSTEM
|
|||
LD_LIBRARY_PATH=
|
||||
PYTHONPATH=
|
||||
else
|
||||
# PYTHON_DIST_BUILD_PATH based on libapparmor/swig/python/test/Makefile.am
|
||||
PYTHON_DIST_BUILD_PATH = ../../libraries/libapparmor/swig/python/build/$$($(PYTHON) -c "import distutils.util; import platform; print(\"lib.%s-%s\" %(distutils.util.get_platform(), platform.python_version()[:3]))")
|
||||
LD_LIBRARY_PATH=../../libraries/libapparmor/src/.libs/
|
||||
PYTHONPATH=..
|
||||
PYTHONPATH=..:$(PYTHON_DIST_BUILD_PATH)
|
||||
endif
|
||||
|
||||
.PHONY: __libapparmor
|
||||
|
|
Loading…
Add table
Reference in a new issue