All the problems above are related to python byte code, and the way it is handled in gentoo. It would be to exhaustive to explain the problems here but maybe this bug [1] helps to understand the problem. Also if you want to learn more about python in gentoo you can read this [2].
In the case of scons and docbook the problem is the same as mentoned in the bug where python bytecode is installed into the wrong filesystem location. Other problems can occur when the python eclasses which handle the python byte code are not used at all or improperly used with python applications. For instance when python byte code is not handled by the eclasses the py{c,o} files are created at runtime when using the program as root. At deinstallation this files are not removed from the filesystem because the package manager is not aware of them. [1] http://bugs.gentoo.org/show_bug.cgi?id=194343 [2] http://www.gentoo.org/proj/en/Python/developersguide.xml