When I was building LDOCE5 Viewer on macOS Big Sur with the command sudo DISTUTILS_DEBUG=1 python3 setup.py py2app, the output print this error:
sudo DISTUTILS_DEBUG=1 python3 setup.py py2app