Python setuptools 61.2 changed the build_platlib dir and broke the tests
Python setuptools 61.2 changed the format of the path where a built library is placed into. This broke swig/python/test/test_python.py due to this line in libraries/libapparmor/swig/python/test/Makefile.am:
# 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()))")'
It results in:
======================================
: swig/python/test/test-suite.log
=======================================
# TOTAL: 1
# PASS: 0
# SKIP: 0
# XFAIL: 0
# FAIL: 1
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: test_python.py
====================
Traceback (most recent call last):
File "/home/abuild/rpmbuild/BUILD/apparmor-3.0.4/libraries/libapparmor/swig/python/test/./test_python.py", line 16, in <module>
import LibAppArmor as libapparmor
ModuleNotFoundError: No module named 'LibAppArmor'
FAIL test_python.py (exit status: 1)