Trivial: Improving error reporting when assert_has_calls fails by davidair · Pull Request #8205 · python/cpython (original) (raw)

encukou pushed a commit to encukou/cpython that referenced this pull request

Sep 29, 2020

@encukou

Upstream r79310 removed the "Modules" directory from sys.path when Python is running from the build directory on POSIX to fix a unit test (issue python#8205). This seems to have broken the compileall.py done in "make install": it cannot find shared library extension modules at this point in the build (sys.path does not contain DESTDIR/usr/lib(64)/python-2.7/lib-dynload for some reason), leading to the build failing with: Traceback (most recent call last): File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/compileall.py", line 17, in import struct File "/home/david/rpmbuild/BUILDROOT/python-2.7-0.1.rc2.fc14.x86_64/usr/lib64/python2.7/struct.py", line 1, in from _struct import * ImportError: No module named _struct This patch adds the build Modules directory to build path.